aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2025-04-05 19:13:13 -0700
committerGitHub <noreply@github.com>2025-04-06 02:13:13 +0000
commitfece4897940896f487559b955e4f8f76d48f299c (patch)
treea8118b7c352ff855d8c60ab1eadf615b1fa94cb4 /runtime/lua
parent28e819018520a2300eaeeec6794ffcd614b25dd2 (diff)
downloadrneovim-fece4897940896f487559b955e4f8f76d48f299c.tar.gz
rneovim-fece4897940896f487559b955e4f8f76d48f299c.tar.bz2
rneovim-fece4897940896f487559b955e4f8f76d48f299c.zip
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.
Diffstat (limited to 'runtime/lua')
-rw-r--r--runtime/lua/vim/lsp.lua2
1 files changed, 2 insertions, 0 deletions
diff --git a/runtime/lua/vim/lsp.lua b/runtime/lua/vim/lsp.lua
index 2b531cf76e..b4b7df8658 100644
--- a/runtime/lua/vim/lsp.lua
+++ b/runtime/lua/vim/lsp.lua
@@ -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