-
Notifications
You must be signed in to change notification settings - Fork 797
go1.18范型语法高亮错误 #2093
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
Comments
% go version % gopls -v version
|
Can you run "Go: Locate Configured Go Tools" command and check if the extension chose the right go version (1.18)?
|
Checking configured tools....
|
Thanks. @xiazemin Did you update your go.mod file to use go1.18 language feature? If that's the cause of the issue, run |
after I use it works for me |
@xiazemin I am confused. Can you clarify if the issue was due to the go version statement in |
cleared up by restarting a gopls (without any code/go.mod change) |
Thanks. I guess some transient version mismatch made gopls to report the issue, but, unfortunately, I don't see a path to investigate further without an example to reproduce the problem. |
I have met this issue too, but i solved it by upgrade my gopls version to the latest.Hope that will help the other people who have met the same problem. |
What version of Go, VS Code & VS Code Go extension are you using?
Version Information
go version
to get version of Go from the VS Code integrated terminal.gopls -v version
to get version of Gopls from the VS Code integrated terminal.code -v
orcode-insiders -v
to get version of VS Code or VS Code Insiders.Go: Locate Configured Go Tools
command.Share the Go related settings you have added/edited
Run
Preferences: Open Settings (JSON)
command to open your settings.json file.Share all the settings with the
go.
or["go"]
orgopls
prefixes.Describe the bug
A clear and concise description of what the bug.
A clear and concise description of what you expected to happen.
Steps to reproduce the behavior:
Screenshots or recordings
If applicable, add screenshots or recordings to help explain your problem.
The text was updated successfully, but these errors were encountered: