1
0
Fork 0
This commit is contained in:
Felipe 2023-03-31 20:16:08 -03:00
parent dccd511bf7
commit 7d665bd859
Signed by: pitbuster
SSH key fingerprint: SHA256:HDYu2Pm4/TmSX8GBwV49UvFWr1Ljg8XlHxKeCpjJpOk

View file

@ -139,16 +139,16 @@ end
-- Use a loop to conveniently call 'setup' on multiple servers and
-- map buffer local keybindings when the language server attaches
local servers = {
clangd,
gopls,
jsonls,
kotlin_language_server,
marksman,
pylsp,
rust_analyzer,
texlab,
tflint,
tsserver,
clangd = {},
gopls = {},
jsonls = {},
kotlin_language_server = {},
marksman = {},
pylsp = {},
rust_analyzer = {},
texlab = {},
tflint = {},
tsserver = {},
}
-- Setup loop moved to the cmp section, since calling setup multiple times
-- overrides the previous calls.
@ -216,23 +216,17 @@ cmp.setup({
local capabilities = vim.lsp.protocol.make_client_capabilities()
lsp.util.default_config = vim.tbl_deep_extend(
'force', lsp.util.default_config, { capabilities = capabilities, })
for server, settings in pairs(servers) do
if settings then
lsp[server].setup({
on_attach = on_lsp_attach,
flags = {
debounce_text_changes = 150,
},
settings = settings,
})
else
lsp[server].setup({
on_attach = on_lsp_attach,
flags = {
debounce_text_changes = 150,
},
})
for server, add_to_config in pairs(servers) do
config = {
on_attach = on_lsp_attach,
flags = {
debounce_text_changes = 150,
},
}
for k,v in pairs(add_to_config) do
config[k] = v
end
lsp[server].setup(config)
end
---- git-blame.nvim
g.gitblame_enabled = 0