mirror of
https://github.com/neovim/neovim
synced 2025-07-16 01:01:49 +00:00
refactor(lsp): deprecate client_is_stopped #33342
Problem: `client_is_stopped(…)` is an alias for `not get_client_by_id(…)`. And it's not used anywhere in our codebase. Solution: Deprecate it.
This commit is contained in:
@ -1468,11 +1468,13 @@ function lsp.foldtext()
|
||||
return vim.lsp._folding_range.foldtext()
|
||||
end
|
||||
|
||||
---@deprecated Use |vim.lsp.get_client_by_id()| instead.
|
||||
---Checks whether a client is stopped.
|
||||
---
|
||||
---@param client_id (integer)
|
||||
---@return boolean stopped true if client is stopped, false otherwise.
|
||||
function lsp.client_is_stopped(client_id)
|
||||
vim.deprecate('vim.lsp.client_is_stopped()', 'vim.lsp.get_client_by_id()', '0.14')
|
||||
assert(client_id, 'missing client_id param')
|
||||
return not all_clients[client_id]
|
||||
end
|
||||
|
Reference in New Issue
Block a user