diff --git a/lua/ow/lsp/server.lua b/lua/ow/lsp/server.lua index 3f24053..88180fd 100644 --- a/lua/ow/lsp/server.lua +++ b/lua/ow/lsp/server.lua @@ -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",