-
Notifications
You must be signed in to change notification settings - Fork 910
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
VS Code Support #1114
Comments
It appears that the GOPATH wasn't picked up VS Code. Remeber that This may be helpful: https://github.com/Microsoft/vscode-go/wiki/GOPATH-in-the-VS-Code-Go-extension |
@aykevl Thanks for quick reply I have added tinygo to my .bash_profile
after closing and restarting vscode This works but is it the recommended way of writing code in go? Is there a way to get type hints for my specific board? its the Arduino nano 33 IoT looking at sample code package main
import (
"machine"
"time"
)
func main() {
led := machine.LED
led.Configure(machine.PinConfig{Mode: machine.PinOutput})
for {
led.Low()
time.Sleep(time.Millisecond * 500)
led.High()
time.Sleep(time.Millisecond * 500)
}
} I get type hints for machine.PinConfig but not for machine.LED |
You will also need to configure build tags. I think you can use
I know this is a bit involved. I'm hoping that we can properly fix this in the future (#941 is a part of that). Until then, this should work. |
Great thanks for all your help. I'm excited to write some Go! |
similar to #465
I'm just getting started with go and am having trouble integrating with VS Code.
I'm on mac and have installed tinygo via homebrew.
According to docs I can run
export GOPATH=$GOPATH:/usr/local/Cellar/tinygo/0.13.1/libexec/tinygo
This however does nothing for vscode import errors.
I'm assuming I need to symlink
/usr/local/Cellar/tinygo/0.13.1/libexec/tinygo
into~/go/src/machine
Does anyone know how to fix these errors in vscode? What is the recommended approach? As I said i'm inexperienced with golang,
The text was updated successfully, but these errors were encountered: