From efe14244e036cc5fee1d660d84a3391ff53411d0 Mon Sep 17 00:00:00 2001 From: Oscar Wallberg Date: Wed, 21 May 2025 06:40:08 +0200 Subject: [PATCH] fix(lsp): use empty default_config if not given for custom servers --- lua/ow/lsp/server.lua | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lua/ow/lsp/server.lua b/lua/ow/lsp/server.lua index 88180fd..e7484f1 100644 --- a/lua/ow/lsp/server.lua +++ b/lua/ow/lsp/server.lua @@ -359,8 +359,11 @@ 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 = vim.deepcopy(config.lspconfig) } + require("lspconfig.configs")[name] = vim.tbl_deep_extend( + "keep", + { default_config = {} }, + config.lspconfig + ) elseif ok then config.lspconfig = vim.tbl_deep_extend( "keep",