From fece4897940896f487559b955e4f8f76d48f299c Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Sat, 5 Apr 2025 19:13:13 -0700 Subject: refactor(lsp): deprecate client_is_stopped #33342 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- runtime/lua/vim/lsp.lua | 2 ++ 1 file changed, 2 insertions(+) (limited to 'runtime/lua') 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 -- cgit