aboutsummaryrefslogtreecommitdiff
path: root/lua/plugins/opts/lspconfig.lua
blob: ecbf65a83171245905b44cc2ed038add0f1d48b7 (plain) (blame)
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
local lsp_zero = require("lsp-zero")
local lspconfig = require("lspconfig")

lsp_zero.extend_lspconfig()
lsp_zero.set_sign_icons({
	error = "󰅚 ",
	warn = "󰀪 ",
	info = "󰋽 ",
	hint = "󰌶 ",
})
lsp_zero.on_attach(function(_, bufnr)
	lsp_zero.default_keymaps({ buffer = bufnr })
end)

lspconfig.lua_ls.setup(lsp_zero.nvim_lua_ls({
	settings = {
		Lua = {
			diagnostics = {
				globals = { "mp" }, -- mpv global
			},
		},
	},
}))

lspconfig.ccls.setup({
	init_options = {
		compilationDatabaseDirectory = "build",
		cache = {
			directory = vim.fn.stdpath("cache") .. "/ccls",
		},
	},
})

lspconfig.gopls.setup({
	settings = {
		gopls = {
			completeUnimported = true,
			usePlaceholders = true,
			analyses = {
				unusedparms = true,
			},
		},
	},
})

lspconfig.bashls.setup({})
lspconfig.nil_ls.setup({})
lspconfig.pyright.setup({})

lspconfig.tsserver.setup({})
lspconfig.svelte.setup({})
lspconfig.tailwindcss.setup({})