From b636b78d236ff17b18ef4a7bdb07692f8834982f Mon Sep 17 00:00:00 2001 From: ayamir Date: Wed, 11 Dec 2024 21:02:46 +0800 Subject: [PATCH] fix: merge user customized config with predefined. --- lua/modules/configs/completion/mason-lspconfig.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lua/modules/configs/completion/mason-lspconfig.lua b/lua/modules/configs/completion/mason-lspconfig.lua index 567ff9f94..a86e4034f 100644 --- a/lua/modules/configs/completion/mason-lspconfig.lua +++ b/lua/modules/configs/completion/mason-lspconfig.lua @@ -66,6 +66,10 @@ please REMOVE your LSP configuration (rust_analyzer.lua) from the `servers` dire --- See `clangd.lua` for example. custom_handler(opts) elseif type(custom_handler) == "table" then + local predefined_ok, predefined = pcall(require, "completion.servers." .. lsp_name) + if predefined_ok then + opts = vim.tbl_deep_extend("force", opts, predefined) + end nvim_lsp[lsp_name].setup(vim.tbl_deep_extend("force", opts, custom_handler)) else vim.notify(