feat(go): show the values of constants as inlay hints

gopls computes the value of each constant in a declaration, including iota
sequences, but only reports it as an inlay hint when its constantValues hint
is on. Turn it on, so Sunday Weekday = iota shows = 0 and the following
constants = 1, = 2 without hovering each one.
Цей коміт міститься в:
l0ng-ai committed 2026-11-20 20:16:17 +08:00
1 джерело 608b292510
коміт 322f6b3d9d
1 file changed
+1 -1
+1 -1
Переглянути файл
@@ -17,7 +17,7 @@ func main() {
[[language-servers]]
name = "gopls"
command = "gopls"
initialization-options = { semanticTokens = true, vulncheck = "Imports" }
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"