fix opts override

master
ChristianChiarulli 2 years ago
parent 0a9e1cad51
commit 4365222349

@ -7,9 +7,9 @@ local lspconfig = require("lspconfig")
local servers = { "jsonls", "sumneko_lua" } local servers = { "jsonls", "sumneko_lua" }
lsp_installer.setup { lsp_installer.setup({
ensure_installed = servers ensure_installed = servers,
} })
for _, server in pairs(servers) do for _, server in pairs(servers) do
local opts = { local opts = {
@ -18,7 +18,7 @@ for _, server in pairs(servers) do
} }
local has_custom_opts, server_custom_opts = pcall(require, "user.lsp.settings." .. server) local has_custom_opts, server_custom_opts = pcall(require, "user.lsp.settings." .. server)
if has_custom_opts then if has_custom_opts then
opts = vim.tbl_deep_extend("force", server_custom_opts, opts) opts = vim.tbl_deep_extend("force", opts, server_custom_opts)
end end
lspconfig[server].setup(opts) lspconfig[server].setup(opts)
end end

Loading…
Cancel
Save