summaryrefslogtreecommitdiffstats
path: root/.config/nvim/lua/lsp/gopls.lua
blob: c37da3989439d7323a8da0f2b8562f1928e8365c (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
vim.lsp.config('gopls', {
	cmd = {'gopls'},
	filetypes = { 'go', 'gomod', 'gowork', 'gotmpl' },
	root_markers = {'go.mod', 'go.sum', '.git'},
	settings = {
		gopls = {
			analyses = {
				unreachable = true,
				unusedparams = true,
			},
			codelenses = {
				generate = true,
				gc_details = true,
			},
			annotations = {
				bounds = true,
				escape = true,
				inline = true,
			},
			gofumpt = true,
		}
	}
})

vim.lsp.enable('gopls')