mirror of
https://codeberg.org/leana8959/.files.git
synced 2026-02-01 14:39:39 +00:00
nvim/lsp: fix binding configuration
This commit is contained in:
parent
cc4d58aab9
commit
d6cf97001d
1 changed files with 7 additions and 9 deletions
|
|
@ -91,14 +91,12 @@ vim.lsp.set_log_level("off")
|
||||||
-- It is not recommended to break lspconfig into different settings
|
-- It is not recommended to break lspconfig into different settings
|
||||||
-- related: https://github.com/neovim/nvim-lspconfig/issues/970#issuecomment-860080502
|
-- related: https://github.com/neovim/nvim-lspconfig/issues/970#issuecomment-860080502
|
||||||
for name, user_config in pairs(servers) do
|
for name, user_config in pairs(servers) do
|
||||||
if next(user_config) ~= nil then
|
local default_config = {
|
||||||
local default_config = {
|
capabilities = mylsp.capabilities,
|
||||||
capabilities = mylsp.capabilities,
|
settings = user_config,
|
||||||
settings = user_config,
|
on_attach = function(client, bufno) mylsp.on_attach(client, bufno) end,
|
||||||
on_attach = function(client, bufno) mylsp.on_attach(client, bufno) end,
|
}
|
||||||
}
|
local merged_config = vim.tbl_deep_extend("force", default_config, user_config or {})
|
||||||
local merged_config = vim.tbl_deep_extend("force", default_config, user_config)
|
vim.lsp.config(name, merged_config)
|
||||||
vim.lsp.config(name, merged_config)
|
|
||||||
end
|
|
||||||
vim.lsp.enable(name)
|
vim.lsp.enable(name)
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue