feat(lsp): deprecate vim.lsp.stop_client (#36459)

* feat(lsp): deprecate `vim.lsp.stop_client`

* fix(tests): fix nil variable in diagnostic_spec.lua
This commit is contained in:
Olivia Kinnear
2025-11-10 20:27:13 -06:00
committed by GitHub
parent 637c9c4f5f
commit 7c9b865bdd
7 changed files with 36 additions and 74 deletions

View File

@@ -116,7 +116,7 @@ int main() {
it('clears inlay hints when sole client detaches', function()
exec_lua(function()
vim.lsp.stop_client(client_id)
vim.lsp.get_client_by_id(client_id):stop()
end)
screen:expect({ grid = grid_without_inlay_hints, unchanged = true })
end)
@@ -139,7 +139,7 @@ int main() {
end)
exec_lua(function()
vim.lsp.stop_client(client_id2)
vim.lsp.get_client_by_id(client_id2):stop()
end)
screen:expect({ grid = grid_with_inlay_hints, unchanged = true })
end)
@@ -422,7 +422,7 @@ test text
exec_lua([[vim.lsp.inlay_hint.enable(true, { bufnr = bufnr })]])
screen:expect({ grid = grid_with_inlay_hints })
exec_lua(function()
vim.lsp.stop_client(client_id)
vim.lsp.get_client_by_id(client_id):stop()
end)
screen:expect({ grid = grid_without_inlay_hints, unchanged = true })
end)