Repository navigation
Expand file tree
/
Copy pathmason.lua
More file actions
65 lines (64 loc) · 2.18 KB
/
Copy pathmason.lua
File metadata and controls
65 lines (64 loc) · 2.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
-- Customize Mason plugins
---@type LazySpec
return {
-- use mason-lspconfig to configure LSP installations
{
"williamboman/mason-lspconfig.nvim",
-- overrides `require("mason-lspconfig").setup(...)`
opts = function(_, opts)
-- add more things to the ensure_installed table protecting against community packs modifying it
opts.ensure_installed = require("astrocore").list_insert_unique(opts.ensure_installed, { "lua_ls" })
-- opts.handlers.rust_analyzer= function() end
-- opts.handlers = {
-- function(server_name)
-- if server_name == "tsserver" then
-- server_name = "ts_ls"
-- end
-- end,
-- }
end,
},
-- use mason-null-ls to configure Formatters/Linter installation for null-ls sources
{
"jay-babu/mason-null-ls.nvim",
-- overrides `require("mason-null-ls").setup(...)`
opts = function(_, opts)
local null_ls = require "null-ls"
local parsers = {
javascript = "babel",
scss = "scss",
json = "json",
html = "html",
vue = "vue",
}
-- add more things to the ensure_installed table protecting against community packs modifying it
opts.ensure_installed = require("astrocore").list_insert_unique(opts.ensure_installed, {
"prettier",
"stylua",
-- add more arguments for adding more null-ls sources
})
opts.handlers = {
prettierd = function() end,
prettier = function()
null_ls.register(null_ls.builtins.formatting.prettier.with {
extra_args = function(params)
local parser = parsers[params.ft]
if parser then return { "--parser", parsers[params.ft] } end
end,
})
end,
}
end,
},
{
"jay-babu/mason-nvim-dap.nvim",
-- overrides `require("mason-nvim-dap").setup(...)`
opts = function(_, opts)
-- add more things to the ensure_installed table protecting against community packs modifying it
opts.ensure_installed = require("astrocore").list_insert_unique(opts.ensure_installed, {
"python",
-- add more arguments for adding more debuggers
})
end,
},
}