Files
openidea/languages/go.toml
T
l0ng-ai e96b0483ac feat(go): show the values of constants as inlay hints (#4807)
gopls computes constant values, iota sequences included, but reports them as inlay hints only with its constantValues hint on; the Go language definition now enables it.
2026-11-20 20:16:41 +08:00

30 lines
680 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", hints = { constantValues = true } }
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"