Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect syntax highlighting for Go #205306

Closed
findleyr opened this issue Feb 15, 2024 · 2 comments
Closed

Incorrect syntax highlighting for Go #205306

findleyr opened this issue Feb 15, 2024 · 2 comments
Assignees

Comments

@findleyr
Copy link

Does this issue occur when all extensions are disabled?: Yes

  • VS Code Version: 1.86.2
  • OS Version: Windows 10 Enterprise

Steps to Reproduce:

  1. Install VS Code 1.86.2
  2. Create a file main.go, with the following contents:
package main

func main() {
  var s []byte = []byte("]")
  println(s)
}
  1. Observe that println is highlighted as a string -- the "]" highlighting is not terminated at the closing ". Here's a related screenshot from one of our users. (Please ignore that the Go extension is installed in this screenshot, the issue reproduces without the Go extension.)
    image

I'm one of the maintainers of the Go extension. This was reported to us in golang/vscode-go#3158, but appears to be a recent regression in VS Code 1.86, not the Go extension. Per the 1.86 release notes, this was likely broken by the switch to https://github.com/worlpaker/go-syntax.

@RedCMD
Copy link
Contributor

RedCMD commented Feb 15, 2024

dup of #205005

https://marketplace.visualstudio.com/items?itemName=golang.Go does not supply its own go grammar
but instead relies on VSCode's builtin go grammar
which changed in 1.86

@findleyr
Copy link
Author

Thanks. I'll close as a dupe.

@findleyr findleyr closed this as not planned Won't fix, can't repro, duplicate, stale Feb 15, 2024
@microsoft microsoft locked and limited conversation to collaborators Jun 10, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants