We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4ba3af1 commit c028d1bCopy full SHA for c028d1b
2 files changed
after/ftplugin/go.lua
@@ -0,0 +1,5 @@
1
+-- gofumpt adds more rule to gofmt, and is compatible with gofmt,
2
+-- so also https://github.com/mvdan/gofumpt
3
+vim.keymap.set("n", "<Space>f", function()
4
+ vim.cmd([[silent !gofumpt -w %]])
5
+end, { buffer = true, silent = true })
after/lsp/gopls.lua
@@ -0,0 +1,14 @@
+-- settings for gopls can be found in https://go.dev/gopls/settings
+---@type vim.lsp.Config
+return {
+ settings = {
+ gopls = {
6
+ usePlaceholders = true,
7
+ analyses = {
8
+ unusedparams = true,
9
+ },
10
+ staticcheck = true,
11
+ gofumpt = true,
12
13
14
+}
0 commit comments