mirror of
https://github.com/tiyn/dotfiles.git
synced 2025-10-24 18:21:16 +02:00
nvim: fixed broken lsp configs
This commit is contained in:
@@ -43,42 +43,38 @@ return {
|
|||||||
"yamlls",
|
"yamlls",
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
local default_flags = {
|
||||||
|
debounce_text_changes = 150,
|
||||||
|
allow_incremental_sync = true,
|
||||||
|
progress = true,
|
||||||
|
}
|
||||||
local servers = {
|
local servers = {
|
||||||
lua_ls = {
|
|
||||||
lua = {
|
|
||||||
diagnostics = {
|
|
||||||
globals = { "vim" },
|
|
||||||
},
|
|
||||||
telemetry = { enable = false },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
ltex = {
|
ltex = {
|
||||||
ltex = {
|
settings = {
|
||||||
-- language = "de-DE",
|
ltex = {
|
||||||
enabled = { "latex" },
|
-- language = "de-DE",
|
||||||
dictionary = Dictionaries,
|
enabled = { "latex", "markdown" },
|
||||||
|
dictionary = Dictionaries,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
lua_ls = {
|
||||||
|
settings = {
|
||||||
|
lua = {
|
||||||
|
diagnostics = { globals = { "vim" } },
|
||||||
|
telemetry = { enable = false },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
pyright = {}
|
||||||
}
|
}
|
||||||
local default = {
|
for name, config in pairs(servers) do
|
||||||
__index = function()
|
vim.lsp.config(name, vim.tbl_extend("force", config, {
|
||||||
return {}
|
on_attach = on_attach,
|
||||||
end,
|
capabilities = Capabilities,
|
||||||
}
|
flags = default_flags,
|
||||||
setmetatable(servers, default)
|
}))
|
||||||
-- require("mason-lspconfig").setup_handlers({
|
end
|
||||||
-- function(server_name)
|
|
||||||
-- require('lspconfig')[server_name].setup({
|
|
||||||
-- on_attach = Attach_func,
|
|
||||||
-- capabilities = Capabilities,
|
|
||||||
-- flags = {
|
|
||||||
-- debounce_text_changes = 150
|
|
||||||
-- },
|
|
||||||
-- settings = servers[server_name]
|
|
||||||
-- })
|
|
||||||
-- end
|
|
||||||
-- })
|
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user