feat!(plugins): remove mason

BREAKING CHANGE: remove the need for `mason` and thus lsp plugins have
to be installed system-wide
This commit is contained in:
2025-07-14 11:20:25 +02:00
parent 1f39139f1d
commit 3815c4fc54
4 changed files with 47 additions and 69 deletions

View File

@ -86,53 +86,10 @@ require('which-key').add {
{ "<leader>h", desc = "Git [H]unk", mode = "v" },
}
-- mason-lspconfig requires that these setup functions are called in this order
-- before setting up the servers.
require('mason').setup()
require('mason-lspconfig').setup()
-- Enable the following language servers
-- Feel free to add/remove any LSPs that you want here. They will automatically be installed.
--
-- Add any additional override configuration in the following tables. They will be passed to
-- the `settings` field of the server config. You must look up that documentation yourself.
--
-- If you want to override the default filetypes that your language server will attach to you can
-- define the property 'filetypes' to the map in question.
local servers = {
clangd = {},
bashls = {},
-- gopls = {},
pyright = {},
-- rust_analyzer = {},
ts_ls = {},
eslint = {},
-- html = { filetypes = { 'html', 'twig', 'hbs'} },
texlab = {},
tinymist = {},
lua_ls = {
Lua = {
workspace = { checkThirdParty = false },
telemetry = { enable = false },
-- NOTE: toggle below to ignore Lua_LS's noisy `missing-fields` warnings
-- diagnostics = { disable = { 'missing-fields' } },
},
},
}
-- nvim-cmp supports additional completion capabilities, so broadcast that to servers
local capabilities = vim.lsp.protocol.make_client_capabilities()
capabilities = require('cmp_nvim_lsp').default_capabilities(capabilities)
-- Ensure the servers above are installed
local mason_lspconfig = require 'mason-lspconfig'
mason_lspconfig.setup {
ensure_installed = vim.tbl_keys(servers),
automatic_installation = true,
automatic_enable = true,
}
-- [[ System LSPs ]]
local setup_godot_dap = function()
local dap = require("dap")
@ -157,5 +114,23 @@ end
setup_godot_dap()
-- [[ lsp configurations ]]
vim.lsp.config("lua_ls", {
settings = {
Lua = {
workspace = { checkThirdParty = false },
telemetry = { enable = false },
-- NOTE: toggle below to ignore Lua_LS's noisy `missing-fields` warnings
-- diagnostics = { disable = { 'missing-fields' } },
},
}
})
vim.diagnostic.config({ virtual_lines = true })
vim.lsp.enable({ "ltex_ls_plus", "rust-analyzer", "gdscript" })
vim.lsp.enable({
-- managed in lsp directory
"ltex_ls_plus", "rust-analyzer", "gdscript",
-- managed by lsp-config
"tinymist", "texlab", "clangd", "pyright", "ts_ls", "eslint", "lua_ls", "bashls"
})