Skip to content

Commit

Permalink
fix: merge user customized config with predefined.
Browse files Browse the repository at this point in the history
  • Loading branch information
ayamir committed Dec 11, 2024
1 parent 38c3ee4 commit b636b78
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lua/modules/configs/completion/mason-lspconfig.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit b636b78

Please sign in to comment.