diff options
| author | Raphael <glepnir@neovim.pro> | 2023-01-31 19:01:36 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-01-31 19:01:36 +0800 |
| commit | 902d6aa31450d26e11bedcbef8af5b6fe2e1ffe8 (patch) | |
| tree | dd9cc8b6bdfbd13a147421c9fdd74d7f59b2cc7f /lua/lspconfig/util.lua | |
| parent | docs: update server_configurations.md (diff) | |
| download | nvim-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/lspconfig/util.lua')
| -rw-r--r-- | lua/lspconfig/util.lua | 4 |
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 |
