Closed mokiat closed 5 months ago
Please check https://github.com/golang/vscode-go/wiki/faq#syntax-highlighting-doesnt-seem-to-work and if it is about the default syntax highlighting (not the semantic highlighting), please report the issue to the go-syntax project.
I have checked. Using "gopls": { "ui.semanticTokens": true }
the issue cannot be reproduced.
Side note: It still happens when done in a separate tab snippet but I guess the semantic tokens styling is not applied when the code is incomplete or is outside a project and VSCode defaults to go syntax.
I guess I should report this to go-syntax
as a follow up.
What version of Go, VS Code & VS Code Go extension are you using?
Version Information
* Run `go version` to get version of Go from _the VS Code integrated terminal_. - `go version go1.22.2 linux/amd64` * Run `gopls -v version` to get version of Gopls from _the VS Code integrated terminal_. - `golang.org/x/tools/gopls v0.15.3` * Run `code -v` or `code-insiders -v` to get version of VS Code or VS Code Insiders. - `1.88.1` * Check your installed extensions to get the version of the VS Code Go extension - `v0.41.4` * Run Ctrl+Shift+P (Cmd+Shift+P on Mac OS) > `Go: Locate Configured Go Tools` command. - ``` gopls: /home/momchil/.go/bin/gopls (version: v0.15.3 built with go: go1.22.0) gotests: /home/momchil/.go/bin/gotests (version: v1.6.0 built with go: go1.22.0) gomodifytags: /home/momchil/.go/bin/gomodifytags (version: v1.16.0 built with go: go1.22.0) impl: /home/momchil/.go/bin/impl (version: v1.1.0 built with go: go1.22.0) goplay: /home/momchil/.go/bin/goplay (version: v1.0.0 built with go: go1.22.0) dlv: /home/momchil/.go/bin/dlv (version: v1.22.1 built with go: go1.22.0) staticcheck: /home/momchil/.go/bin/staticcheck (version: v0.4.7 built with go: go1.22.0) ```
Share the Go related settings you have added/edited
Describe the bug
The color scheme gets messed up after a specific valid Go code sequence.
Steps to reproduce the behavior:
Go
editor tab in VSCode.if
has a light blue and not the usual purple.Screenshots or recordings