dev-environment-files/.config/nvim/lua/josean/plugins/lsp/mason.lua

58 lines
1.4 KiB
Lua
Raw Normal View History

return {
"williamboman/mason.nvim",
dependencies = {
"williamboman/mason-lspconfig.nvim",
"jayp0521/mason-null-ls.nvim",
},
config = function()
2023-09-02 03:40:47 +02:00
-- import mason
local mason = require("mason")
2022-10-17 20:40:36 +02:00
2023-09-02 03:40:47 +02:00
-- import mason-lspconfig
local mason_lspconfig = require("mason-lspconfig")
2022-10-17 20:40:36 +02:00
2023-09-02 03:40:47 +02:00
-- import mason-null-ls
local mason_null_ls = require("mason-null-ls")
2022-10-17 20:40:36 +02:00
2023-09-02 03:40:47 +02:00
-- enable mason and configure icons
mason.setup({
ui = {
icons = {
package_installed = "",
package_pending = "",
package_uninstalled = ""
}
}
})
2022-10-17 20:40:36 +02:00
mason_lspconfig.setup({
-- list of servers for mason to install
ensure_installed = {
"tsserver",
"html",
"cssls",
"tailwindcss",
"svelte",
"lua_ls",
"graphql",
"emmet_ls",
"prismals",
2023-09-02 03:40:47 +02:00
"pyright"
},
-- auto-install configured servers (with lspconfig)
automatic_installation = true, -- not the same as ensure_installed
})
2022-10-17 20:40:36 +02:00
mason_null_ls.setup({
-- list of formatters & linters for mason to install
ensure_installed = {
"prettier", -- ts/js formatter
"stylua", -- lua formatter
"eslint_d", -- ts/js linter
},
-- auto-install configured servers (with lspconfig)
automatic_installation = true,
})
end,
}