I'm running go1.16, the latest gopls version is not compabtible with it. Confirmed it at https://github.com/golang/tools/blob/master/gopls/README.md. The installation fails with below error
Installing golang.org/x/tools/gopls@latest FAILED
{
"code": 1,
"killed": false,
"signal": null,
"cmd": "/usr/local/bin/go install -v golang.org/x/tools/gopls@latest",
"stdout": "",
"stderr": "go: downloading golang.org/x/tools v0.12.0\ngo/pkg/mod/golang.org/x/tools/[email protected]/internal/lsp/source/options.go:25:2: //go:build comment without // +build comment\n"
}
1 tools failed to install.
I want to use vscode to install a version that is compatible, for example v0.12.4.
I can get it to work by manually installing it, is there a way to configure the version for gopls in vscode ?
Currently(at least under my comprehension), if you want to rollback to specific version of any vscode extension, you can go to the extension page and click the dropdown to find
Install another version.