aboutsummaryrefslogtreecommitdiffstats
path: root/lua
diff options
context:
space:
mode:
authorRaphael <glepnir@neovim.pro>2022-12-25 19:53:42 +0800
committerGitHub <noreply@github.com>2022-12-25 19:53:42 +0800
commit212b99bc12a5416df8b2a610711ba399e2fc388a (patch)
tree460b400df0cba41e56f5c7635adc1fb8379a6d7a /lua
parentfix: check client exist supports_method (#2351) (diff)
downloadnvim-lspconfig-212b99bc12a5416df8b2a610711ba399e2fc388a.tar
nvim-lspconfig-212b99bc12a5416df8b2a610711ba399e2fc388a.tar.gz
nvim-lspconfig-212b99bc12a5416df8b2a610711ba399e2fc388a.tar.bz2
nvim-lspconfig-212b99bc12a5416df8b2a610711ba399e2fc388a.tar.lz
nvim-lspconfig-212b99bc12a5416df8b2a610711ba399e2fc388a.tar.xz
nvim-lspconfig-212b99bc12a5416df8b2a610711ba399e2fc388a.tar.zst
nvim-lspconfig-212b99bc12a5416df8b2a610711ba399e2fc388a.zip
fix: use client config capabilities to check server support workspae (#2354)
Diffstat (limited to 'lua')
-rw-r--r--lua/lspconfig/util.lua5
1 files changed, 3 insertions, 2 deletions
diff --git a/lua/lspconfig/util.lua b/lua/lspconfig/util.lua
index bb8af331..cc9d9956 100644
--- a/lua/lspconfig/util.lua
+++ b/lua/lspconfig/util.lua
@@ -244,8 +244,9 @@ function M.server_per_root_dir_manager(make_config)
if
client
and client.name == conf.name
- and client.supports_method
- and client.supports_method 'workspace/workspaceFolders'
+ and client.config
+ and client.config.capabilities
+ and client.config.capabilities.workspace
then
return client
end