Go

Install Syntax Highlighting

:TSInstall gopls
1

Install Language Server

:LspInstall gopls
1

Formatters

The configured formatter(s) must be installed separately.

Configuration in ~/.config/lvim/config.lua:

-- exe value can be "gofmt", "goimports", or "gofumpt"
lvim.lang.go.formatters = {{ exe = "goimports" }}
1
2

LSP Settings

:NlspConfig gopls
1

Configure json to use auto-completion

Debugger

:DIInstall go_delve
1
-- ~/.config/lvim/ftplugin/go.lua
local dap_install = require "dap-install"
dap_install.config("go_delve", {})
1
2
3