40 lines
1.4 KiB
Lua
40 lines
1.4 KiB
Lua
return {
|
|
-- Mason.
|
|
{
|
|
"williamboman/mason.nvim",
|
|
config = function()
|
|
require("mason").setup()
|
|
end,
|
|
},
|
|
-- Mason LSP Config.
|
|
{
|
|
"williamboman/mason-lspconfig.nvim",
|
|
dependencies = { "neovim/nvim-lspconfig" },
|
|
config = function()
|
|
require("mason-lspconfig").setup({
|
|
ensure_installed = {
|
|
"clangd", "neocmake", "jdtls", "ts_ls", "lua_ls",
|
|
"pyright", "omnisharp", "html", "cssls", "glsl_analyzer",
|
|
"biome", "somesass_ls", "ocamllsp", "rust_analyzer",
|
|
},
|
|
})
|
|
require("mason-lspconfig").setup_handlers({
|
|
function(server_name)
|
|
if server_name == "ocamllsp" then
|
|
require("lspconfig").ocamllsp.setup({
|
|
capabilities = require("cmp_nvim_lsp").default_capabilities(),
|
|
root_dir = function()
|
|
return vim.loop.cwd()
|
|
end,
|
|
})
|
|
else
|
|
require("lspconfig")[server_name].setup({
|
|
capabilities = require("cmp_nvim_lsp").default_capabilities(),
|
|
})
|
|
end
|
|
end,
|
|
})
|
|
end,
|
|
},
|
|
}
|