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/gopls@v0.13.1/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 ?