fix(lsp): fix reloading custom servers

This commit is contained in:
2025-05-21 05:45:42 +02:00
parent 84c6a969a0
commit d479633205
+2 -1
View File
@@ -338,6 +338,7 @@ function M:deinit()
self.linters = nil self.linters = nil
end end
require("lspconfig.configs")[self.name] = nil
require("lspconfig")[self.name] = nil require("lspconfig")[self.name] = nil
end end
@@ -359,7 +360,7 @@ function M.new(name, config)
local ok, resp = pcall(require, "lspconfig.configs." .. name) local ok, resp = pcall(require, "lspconfig.configs." .. name)
if not ok and config.lspconfig then if not ok and config.lspconfig then
local configs = require("lspconfig.configs") local configs = require("lspconfig.configs")
configs[name] = { default_config = config.lspconfig } configs[name] = { default_config = vim.deepcopy(config.lspconfig) }
elseif ok then elseif ok then
config.lspconfig = vim.tbl_deep_extend( config.lspconfig = vim.tbl_deep_extend(
"keep", "keep",