fix(lsp): fix reloading custom servers
This commit is contained in:
@@ -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",
|
||||||
|
|||||||
Reference in New Issue
Block a user