aboutsummaryrefslogtreecommitdiffstats
path: root/lua
diff options
context:
space:
mode:
authorRaphael <glepnir@neovim.pro>2023-01-31 19:01:36 +0800
committerGitHub <noreply@github.com>2023-01-31 19:01:36 +0800
commit902d6aa31450d26e11bedcbef8af5b6fe2e1ffe8 (patch)
treedd9cc8b6bdfbd13a147421c9fdd74d7f59b2cc7f /lua
parentdocs: update server_configurations.md (diff)
downloadnvim-lspconfig-902d6aa31450d26e11bedcbef8af5b6fe2e1ffe8.tar
nvim-lspconfig-902d6aa31450d26e11bedcbef8af5b6fe2e1ffe8.tar.gz
nvim-lspconfig-902d6aa31450d26e11bedcbef8af5b6fe2e1ffe8.tar.bz2
nvim-lspconfig-902d6aa31450d26e11bedcbef8af5b6fe2e1ffe8.tar.lz
nvim-lspconfig-902d6aa31450d26e11bedcbef8af5b6fe2e1ffe8.tar.xz
nvim-lspconfig-902d6aa31450d26e11bedcbef8af5b6fe2e1ffe8.tar.zst
nvim-lspconfig-902d6aa31450d26e11bedcbef8af5b6fe2e1ffe8.zip
fix: check client when get client from cache (#2429)
Diffstat (limited to 'lua')
-rw-r--r--lua/lspconfig/util.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/lua/lspconfig/util.lua b/lua/lspconfig/util.lua
index 86483731..698cd2d9 100644
--- a/lua/lspconfig/util.lua
+++ b/lua/lspconfig/util.lua
@@ -245,7 +245,7 @@ function M.server_per_root_dir_manager(make_config)
if clients[root_dir] then
for _, id in pairs(clients[root_dir]) do
local client = lsp.get_client_by_id(id)
- if client.name == client_name then
+ if client and client.name == client_name then
return client
end
end
@@ -258,7 +258,7 @@ function M.server_per_root_dir_manager(make_config)
for _, id in ipairs(all_client_ids) do
local client = lsp.get_client_by_id(id)
- if client.name == client_name then
+ if client and client.name == client_name then
return client
end
end