aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Lingelbach <m.j.lbach@gmail.com>2021-12-25 00:45:07 -0500
committerGitHub <noreply@github.com>2021-12-25 00:45:07 -0500
commit5b8bea1b7177d7ced74bb0fd501cbe682f13b370 (patch)
treeef353738a4adb3f36754faee14bbf30a347b59aa
parentdocs: update server_configurations.md (diff)
downloadnvim-lspconfig-5b8bea1b7177d7ced74bb0fd501cbe682f13b370.tar
nvim-lspconfig-5b8bea1b7177d7ced74bb0fd501cbe682f13b370.tar.gz
nvim-lspconfig-5b8bea1b7177d7ced74bb0fd501cbe682f13b370.tar.bz2
nvim-lspconfig-5b8bea1b7177d7ced74bb0fd501cbe682f13b370.tar.lz
nvim-lspconfig-5b8bea1b7177d7ced74bb0fd501cbe682f13b370.tar.xz
nvim-lspconfig-5b8bea1b7177d7ced74bb0fd501cbe682f13b370.tar.zst
nvim-lspconfig-5b8bea1b7177d7ced74bb0fd501cbe682f13b370.zip
fix: properly handle sanitizing bufname in .launch() (#1608)
-rw-r--r--lua/lspconfig/configs.lua9
1 files changed, 4 insertions, 5 deletions
diff --git a/lua/lspconfig/configs.lua b/lua/lspconfig/configs.lua
index 6edaae1a..b375fef0 100644
--- a/lua/lspconfig/configs.lua
+++ b/lua/lspconfig/configs.lua
@@ -98,11 +98,10 @@ function configs.__newindex(t, config_name, config_def)
for _, bufnr in ipairs(vim.api.nvim_list_bufs()) do
local bufname = api.nvim_buf_get_name(bufnr)
if util.bufname_valid(bufname) then
- return
- end
- local buf_dir = util.path.sanitize(bufname)
- if buf_dir:sub(1, root_dir:len()) == root_dir then
- M.manager.try_add_wrapper(bufnr)
+ local buf_dir = util.path.sanitize(bufname)
+ if buf_dir:sub(1, root_dir:len()) == root_dir then
+ M.manager.try_add_wrapper(bufnr)
+ end
end
end
elseif config.single_file_support then