aboutsummaryrefslogtreecommitdiffstats
path: root/lua
diff options
context:
space:
mode:
Diffstat (limited to 'lua')
-rw-r--r--lua/lspconfig/configs.lua7
1 files changed, 7 insertions, 0 deletions
diff --git a/lua/lspconfig/configs.lua b/lua/lspconfig/configs.lua
index a56993d0..13b92b17 100644
--- a/lua/lspconfig/configs.lua
+++ b/lua/lspconfig/configs.lua
@@ -87,10 +87,12 @@ function configs.__newindex(t, config_name, config_def)
M.cmd = config.cmd
-- In the case of a reload, close existing things.
+ local reload = false
if M.manager then
for _, client in ipairs(M.manager.clients()) do
client.stop(true)
end
+ reload = true
M.manager = nil
end
@@ -173,6 +175,11 @@ function configs.__newindex(t, config_name, config_def)
M.manager = manager
M.make_config = make_config
+ if reload and not (config.autostart == false) then
+ for _, bufnr in ipairs(vim.api.nvim_list_bufs()) do
+ manager.try_add_wrapper(bufnr)
+ end
+ end
end
function M._setup_buffer(client_id, bufnr)