fix: lsp config
This commit is contained in:
parent
2b05047eb9
commit
f8ad1ab559
2 changed files with 22 additions and 21 deletions
|
|
@ -25,12 +25,13 @@ return {
|
|||
local name = vim.fn.fnamemodify(v, ':t:r')
|
||||
local cfg = require("lsp_extend/" .. name)
|
||||
if vim.lsp.config[name] ~= nil then
|
||||
vim.lsp.config(name, vim.tbl_deep_extend("force", cfg, {
|
||||
settings = { [name] = { capabilities } }
|
||||
}))
|
||||
if cfg ~= nil and next(cfg) ~= nil then
|
||||
vim.lsp.config(name, cfg)
|
||||
end
|
||||
vim.lsp.enable(name)
|
||||
else
|
||||
vim.notify("LSP server " .. name .. " does not have a setup function", vim.log.levels.ERROR)
|
||||
vim.notify("LSP server " .. name .. " configuration could not load from lspconfig.",
|
||||
vim.log.levels.ERROR)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue