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
66
67
68
69
70
71
72
|
return {
"williamboman/mason.nvim",
dependencies = {
"williamboman/mason-lspconfig.nvim",
"WhoIsSethDaniel/mason-tool-installer.nvim",
},
config = function()
--import mason
local mason = require("mason")
-- import mason-lspconfig
local mason_lspconfig = require("mason-lspconfig")
local mason_tool_installer = require("mason-tool-installer")
-- enable mason and configure icons
mason.setup({
ui = {
icons = {
package_installed = "",
package_pending = "",
package_uninstalled = "",
},
},
})
mason_lspconfig.setup({
-- list of servers for mason to install
ensure_installed = {
"bashls",
"cssls",
"diagnosticls",
"dockerls",
"docker_compose_language_service",
"gopls",
"lua_ls",
"texlab",
"zk",
"pyright",
"r_language_server",
"sqls",
},
-- auto-install configured servers (with lspconfig)
automatic_installation = true, -- not the same as ensure_installed
})
mason_tool_installer.setup({
ensure_installed = {
"mutt-language-server",
"emmet-ls",
-- Linters:
"prettier",
"bibtex-tidy",
"goimports",
"gci",
"golines",
"shfmt",
"latexindent",
"sql-formatter",
"isort",
"black",
"yamlfix",
"stylua",
-- Formatters:
"stylelint",
"markdownlint",
"pylint",
"golangci-lint",
"shellcheck",
},
})
end,
}
|