nsf / gocode

An autocompletion daemon for the Go programming language
MIT License
5.01k stars 656 forks source link

How to edit GOROOT in Gocode's build context #494

Closed grapehunter closed 6 years ago

grapehunter commented 6 years ago

I have already set a environment variable.

image

Goroot in $env & go env are both right. But it has a incorrect value "C:\go" in gocode's build context.

My os is windows 10 1709 and version of golang is v1.9.3

nsf commented 6 years ago

Gocode passes GOROOT env var (and few others) from client to server on every autocompletion request. Make sure it's correctly set on the client and it should work.

grapehunter commented 6 years ago

@nsf Thank you. I modified go.gopath & go.goroot in vscode ,and it works fine now.