fix(lsp): fix reloading custom servers
This commit is contained in:
@@ -338,6 +338,7 @@ function M:deinit()
|
||||
self.linters = nil
|
||||
end
|
||||
|
||||
require("lspconfig.configs")[self.name] = nil
|
||||
require("lspconfig")[self.name] = nil
|
||||
end
|
||||
|
||||
@@ -359,7 +360,7 @@ function M.new(name, config)
|
||||
local ok, resp = pcall(require, "lspconfig.configs." .. name)
|
||||
if not ok and config.lspconfig then
|
||||
local configs = require("lspconfig.configs")
|
||||
configs[name] = { default_config = config.lspconfig }
|
||||
configs[name] = { default_config = vim.deepcopy(config.lspconfig) }
|
||||
elseif ok then
|
||||
config.lspconfig = vim.tbl_deep_extend(
|
||||
"keep",
|
||||
|
||||
Reference in New Issue
Block a user