2022-10-08 12:44:11 +02:00
|
|
|
local servers = {
|
2022-11-17 19:58:39 +01:00
|
|
|
"ansiblels",
|
2022-10-08 12:44:11 +02:00
|
|
|
"bashls",
|
2022-11-17 19:58:39 +01:00
|
|
|
"gopls",
|
2025-01-26 13:30:36 +01:00
|
|
|
"helm_ls",
|
2022-11-26 20:00:35 +01:00
|
|
|
"html",
|
2023-12-17 14:44:47 +01:00
|
|
|
-- "kotlin_language_server",
|
2023-02-09 19:38:38 +01:00
|
|
|
"jdtls",
|
2022-10-08 12:44:11 +02:00
|
|
|
"jsonls",
|
2023-02-13 19:27:54 +01:00
|
|
|
"lua_ls",
|
2025-02-14 15:57:37 +01:00
|
|
|
"marksman",
|
2024-03-22 17:21:22 +01:00
|
|
|
"basedpyright",
|
2024-11-20 18:49:13 +01:00
|
|
|
"ruff",
|
2023-01-14 13:01:27 +01:00
|
|
|
"terraformls",
|
2022-10-08 12:44:11 +02:00
|
|
|
"yamlls",
|
|
|
|
}
|
|
|
|
|
|
|
|
local settings = {
|
|
|
|
ui = {
|
2022-10-12 16:02:54 +02:00
|
|
|
border = "rounded",
|
2022-10-08 12:44:11 +02:00
|
|
|
icons = {
|
|
|
|
package_installed = "◍",
|
|
|
|
package_pending = "◍",
|
|
|
|
package_uninstalled = "◍",
|
|
|
|
},
|
|
|
|
},
|
|
|
|
log_level = vim.log.levels.INFO,
|
|
|
|
max_concurrent_installers = 4,
|
|
|
|
}
|
|
|
|
|
|
|
|
require("mason").setup(settings)
|
|
|
|
require("mason-lspconfig").setup({
|
|
|
|
ensure_installed = servers,
|
|
|
|
automatic_installation = true,
|
|
|
|
})
|
|
|
|
|
2023-04-12 20:09:30 +02:00
|
|
|
local lspconfig = require("lspconfig")
|
2022-10-08 12:44:11 +02:00
|
|
|
for _, server in pairs(servers) do
|
2023-11-03 18:48:15 +01:00
|
|
|
if server ~= "yamlls" then
|
|
|
|
local opts = {
|
2025-02-02 19:28:41 +01:00
|
|
|
capabilities = require("blink.cmp").get_lsp_capabilities(),
|
2023-11-03 18:48:15 +01:00
|
|
|
}
|
2022-10-08 12:44:11 +02:00
|
|
|
|
2023-11-03 18:48:15 +01:00
|
|
|
server = vim.split(server, "@")[1]
|
2022-10-08 12:44:11 +02:00
|
|
|
|
2023-11-03 18:48:15 +01:00
|
|
|
-- https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md
|
|
|
|
local config_exists, conf_opts = pcall(require, "plugins.lsp.settings." .. server)
|
|
|
|
if config_exists then
|
|
|
|
opts = vim.tbl_deep_extend("force", conf_opts, opts)
|
|
|
|
end
|
2022-10-08 12:44:11 +02:00
|
|
|
|
2023-11-03 18:48:15 +01:00
|
|
|
lspconfig[server].setup(opts)
|
|
|
|
end
|
2022-10-08 12:44:11 +02:00
|
|
|
end
|