aboutsummaryrefslogtreecommitdiffstats
path: root/lua/lspconfig/util.lua
diff options
context:
space:
mode:
authorRaphael <glepnir@neovim.pro>2022-12-29 16:54:54 +0800
committerGitHub <noreply@github.com>2022-12-29 16:54:54 +0800
commitd066a47be7713dba46736aece1792a4e13aaf1de (patch)
treea03ca4af9e8af2516f07ed3254925410051af0af /lua/lspconfig/util.lua
parentfix: get all client from clients cache in manager.clients (#2365) (diff)
downloadnvim-lspconfig-d066a47be7713dba46736aece1792a4e13aaf1de.tar
nvim-lspconfig-d066a47be7713dba46736aece1792a4e13aaf1de.tar.gz
nvim-lspconfig-d066a47be7713dba46736aece1792a4e13aaf1de.tar.bz2
nvim-lspconfig-d066a47be7713dba46736aece1792a4e13aaf1de.tar.lz
nvim-lspconfig-d066a47be7713dba46736aece1792a4e13aaf1de.tar.xz
nvim-lspconfig-d066a47be7713dba46736aece1792a4e13aaf1de.tar.zst
nvim-lspconfig-d066a47be7713dba46736aece1792a4e13aaf1de.zip
fix: not register workspace when in single file mode (#2367)
Diffstat (limited to 'lua/lspconfig/util.lua')
-rw-r--r--lua/lspconfig/util.lua4
1 files changed, 3 insertions, 1 deletions
diff --git a/lua/lspconfig/util.lua b/lua/lspconfig/util.lua
index b26e9bb9..9b0bb53e 100644
--- a/lua/lspconfig/util.lua
+++ b/lua/lspconfig/util.lua
@@ -304,7 +304,9 @@ function M.server_per_root_dir_manager(make_config)
vim.schedule_wrap(function()
if client_instance.initialized and not timer:is_closing() then
lsp.buf_attach_client(buffer_nr, client_instance.id)
- register_workspace_folders(client_instance)
+ if not single_file then
+ register_workspace_folders(client_instance)
+ end
timer:stop()
timer:close()
end