aboutsummaryrefslogtreecommitdiff
path: root/lua/config/mason.lua
blob: 22f5d2cb2568400f0270bee9732ae1b90259b308 (plain)
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
vim.pack.add({
	"https://github.com/mason-org/mason-lspconfig.nvim",
	"https://github.com/mason-org/mason.nvim",
	"https://github.com/WhoIsSethDaniel/mason-tool-installer.nvim",
	-- "https://github.com/jay-babu/mason-nvim-dap.nvim",
})

require("mason").setup()
-- require("mason-nvim-dap").setup()
require("mason-lspconfig").setup()

require("mason-tool-installer").setup({
	ensure_installed = {
		"vale",
		"lua_ls",
		"stylua",
		"bashls",
		"emmet-language-server",
		"ts_ls",
		"astro",
		"prettier",
		"prettierd",
		"eslint_d",
		{
			"jdtls",
			condition = function()
				return vim.fn.executable("java") == 1
			end,
		},
		{
			"vscode-spring-boot-tools",
			condition = function()
				return vim.fn.executable("java") == 1
			end,
		},
		{
			"lemminx",
			condition = function()
				return vim.fn.executable("java") == 1
			end,
		},
		{
			"sonarlint-language-server",
			condition = function()
				return vim.fn.executable("java") == 1
			end,
		},
		{
			"gradle_ls",
			condition = function()
				return vim.fn.executable("java") == 1
			end,
		},
		{
			-- cobol language server requires java
			"cobol_ls",
			condition = function()
				return vim.fn.executable("java") == 1
			end,
		},
		{
			"rust_analyzer",
			condition = function()
				return vim.fn.executable("rustc") == 1
			end,
		},
	},
})