I am using MacOS and vagrant for Go development. I don't want install any development packages like Go, npm etc. on my host machine (MacOS). All of dev softwares installed on vagrant.
But there is a problem with vscode-go plugin, Because it requires few go packages like go vet, goimport etc. those packages installed on remote host (vagrat)
So how can I say to vscode that run these commands on remote host?
Make a nfs share on the GOPATH environment variable in vagrant. On your Mac define also a GOPATH env variable. That way vscode can install the tools on your vagrant.
Although not sure this covers Mac vs Linux binaries.
Another approach might be too create bash aliases/functions which invoke the command over ssh.
I wrote a blog post on how to set up vscode on windows. I would really recommend to install tools natively. Go tooling is small, super fast and doesn't add lot of bloat to your system. E.g. PHP ads lots of crap etc.
https://marcofranssen.nl/start-on-your-first-golang-project/
Might clarify some stuff for you.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With