nvim: Extend lsp configuration with multiple declarations
So far if LSP declarations in 'core/languages.lua' were duplicated (e.g. the 'astro' filetype and the 'vue' filetype both declare the 'typescript' lsp), one would simply overwrite the other. That is fine as long as there is no custom setup, but if there is one of them is lost. This commit changes it so that the different configurations extend each other. The 'latter' one still overwrites the former but this is just what must happen if there should be conflicting setups. May increase loading time slightly.
This commit is contained in:
parent
1d5fbef0fb
commit
d2432e0039
1 changed files with 1 additions and 1 deletions
|
|
@ -4,7 +4,7 @@ for _, lang in pairs(Languages) do
|
||||||
goto continue
|
goto continue
|
||||||
end
|
end
|
||||||
for name, conf in pairs(lang.lsp) do
|
for name, conf in pairs(lang.lsp) do
|
||||||
servers[name] = conf
|
servers[name] = vim.tbl_deep_extend("force", servers[name] or {}, conf)
|
||||||
end
|
end
|
||||||
::continue::
|
::continue::
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue