Files
openidea/languages/go.toml
T
l0ng-ai fc1493e1a4 feat(go): report upgrades, vulnerabilities and deprecated modules when go.mod opens (#2787)
gopls reports available upgrades only after its "Check for upgrades" code lens runs, never reports deprecated modules, and checks vulnerabilities only on demand. Opening a go.mod now runs the upgrade check once per file and session, gopls' vulncheck setting is on for imports (Go, go.mod, go.work), and `go list -m -u` marks deprecated requirements on open and save. go.mod highlighting also covers godebug, tool and ignore.
2026-11-12 01:14:56 +08:00

30 lines
645 B
TOML

id = "go"
name = "Go"
extensions = ["go"]
line-comment = "//"
block-comment = ["/*", "*/"]
indent = { tab-size = 4, insert-spaces = false }
ui-mode = "Go"
tree-sitter = "go"
scratch-template = '''
package main
func main() {
$END$
}
'''
[[language-servers]]
name = "gopls"
command = "gopls"
initialization-options = { semanticTokens = true, vulncheck = "Imports" }
root-markers = ["go.work", "go.mod"]
install-hint = "go install golang.org/x/tools/gopls@latest"
[debugger]
adapter = "delve"
command = "dlv"
args = ["dap", "--listen", "127.0.0.1:${port}"]
transport = "tcp"
install-hint = "go install github.com/go-delve/delve/cmd/dlv@latest"