aboutsummaryrefslogtreecommitdiffstats
path: root/lua/lspconfig/util.lua
diff options
context:
space:
mode:
Diffstat (limited to 'lua/lspconfig/util.lua')
-rw-r--r--lua/lspconfig/util.lua9
1 files changed, 8 insertions, 1 deletions
diff --git a/lua/lspconfig/util.lua b/lua/lspconfig/util.lua
index b38b8ec6..fcf286d0 100644
--- a/lua/lspconfig/util.lua
+++ b/lua/lspconfig/util.lua
@@ -257,7 +257,13 @@ function M.server_per_root_dir_manager(make_config)
return
end
local client = lsp.get_client_by_id(id)
- if client and client.name == conf.name then
+ if
+ client
+ and client.server_capabilities
+ and client.server_capabilities.workspaceFolders
+ and client.server_capabilities.workspaceFolders.supported
+ and client.name == conf.name
+ then
return client
end
return nil
@@ -272,6 +278,7 @@ function M.server_per_root_dir_manager(make_config)
{ { uri = vim.uri_from_fname(root_dir), name = root_dir } },
{ {} }
)
+ client.rpc.notify('workspace/didChangeWorkspaceFolders', params)
if not client.workspace_folders then
client.workspace_folders = {}
end