summaryrefslogtreecommitdiff
path: root/lua/plugins/lspconfig.lua
blob: 526c164637ebc27189b71b24f7024ade3397c0e9 (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
vim.diagnostic.config({
	virtual_text = true,
	signs = true,
	underline = true,
	severity_sort = true,
})

vim.lsp.config['ccls'] = {
	cmd = { 'ccls' },
	root_markers = { '.ccls-cache', '.ccls' },
	filetypes = { 'c', 'cpp', 'cc', 'h' },
}

vim.lsp.config['gopls'] = {
	cmd = { 'gopls' },
	root_markers = { 'go.mod', 'go.work' },
	filetypes = { 'go' },
}

vim.lsp.config['rust_analyzer'] = {
	cmd = { 'rust-analyzer' },
	root_markers = { 'Cargo.toml' },
	filetypes = { 'rs' },
}

vim.lsp.enable('ccls')
vim.lsp.enable('gopls')
vim.lsp.enable('rust_analyzer')