nvim: Update mason-lspconfig for 2.0
This commit is contained in:
parent
63c6c81f6e
commit
3d1f925f78
2 changed files with 16 additions and 9 deletions
|
|
@ -71,7 +71,7 @@ local languages = {
|
|||
},
|
||||
latex = {
|
||||
-- TODO: May need to switch to ltex_plus at some point since ltex is unmaintained
|
||||
lsp = { ltex = { autostart = false }, texlab = {} },
|
||||
lsp = { ltex = { disable = true }, texlab = {} },
|
||||
ts = { "latex" },
|
||||
},
|
||||
lua = {
|
||||
|
|
|
|||
|
|
@ -23,7 +23,21 @@ local lsp = {
|
|||
dependencies = {
|
||||
{
|
||||
"williamboman/mason-lspconfig.nvim",
|
||||
opts = { automatic_installation = true },
|
||||
opts = function()
|
||||
local to_install = {}
|
||||
local not_enabled = {}
|
||||
for k, v in pairs(get_all_servers()) do
|
||||
table.insert(to_install, k)
|
||||
if v["disable"] and v["disable"] == true then
|
||||
table.insert(not_enabled, k)
|
||||
end
|
||||
end
|
||||
local tbl = {
|
||||
ensure_installed = to_install,
|
||||
automatic_enable = { exclude = not_enabled },
|
||||
}
|
||||
return tbl
|
||||
end,
|
||||
dependencies = { "williamboman/mason.nvim" },
|
||||
cmd = { "LspInstall", "LspUninstall" },
|
||||
},
|
||||
|
|
@ -69,13 +83,6 @@ local lsp = {
|
|||
end
|
||||
end
|
||||
|
||||
for server_name, config in pairs(lspconfig_opts.servers) do
|
||||
register(server_name, config)
|
||||
if vim.fn.has("nvim-0.11") == 0 then
|
||||
config.capabilities = require("blink.cmp").get_lsp_capabilities(config.capabilities)
|
||||
end
|
||||
end
|
||||
|
||||
register("marksman", {
|
||||
filetypes = { "markdown", "quarto" },
|
||||
on_attach = function(client, _)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue