-
Notifications
You must be signed in to change notification settings - Fork 248
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
How to combine Goenv to use VSCode? #293
Comments
Ran into the same issue as well. Any guidance on how to fix this since it prepends to the path causing |
me too ... |
The above solution is not ideal since settings.json will have to be updated whenever the go version is updated. |
When I'm in a directory that defines a
This allows the IDE to inherit the environment values from this directory. I think changing the goroot values manually within vscode is not a maintainable solution when you're working with multiple projects with different |
@tabris233 @waset https://github.com/owenthereal/goup, use this bro, |
I sorted it out and it's working as expected adding this to vscode settings: "go.alternateTools": {
"go": "/path/to/goenv/.goenv/shims"
}, Usually, the path to goenv is Another important thing, the issue #367 seems to be a duplicate of this one. I have not tried all the solutions proposed there as what I described already fixed the issue for me (tested in Mac and Ubuntu on WSL2). If you try all the above steps and you're still having issues, close all vscode instances and run |
Does anyone use both vscode and goenv?
Because of different projects use different Golang versions. So I look for Golang Version Management tool. I found
goenv
, it's cool.Goenv
can install different Goalng versions and switch easily likepyenv
. Very thanks for this tool.I use VSCode to write the golang code. Although I have set
goenv local 1.18.10
, VSCode still recognizes the Golang version ofgoenv global
. Like this.So how to change to
1.18.10
?(Very sorry for my poor english)
The text was updated successfully, but these errors were encountered: