fatih / vim-go

Go development plugin for Vim
https://www.patreon.com/bhcleek
Other
15.98k stars 1.45k forks source link

How to setup gopath manually inside `.vimrc` #3660

Closed coderj001 closed 5 months ago

coderj001 commented 5 months ago

gopath and goroot as i'm using goenv I have trouble running properly in vim

bhcleek commented 5 months ago

goenv is generally not needed in the Go community because of the go1 compatibility guarantee. What problem are you trying to solve with it?

Vim-go expects go to be in PATH and looks for it there.

You can set up GOPATH manually in your vimrc with a simple let statement if you really need to (e.g. let $GOPATH="/my/go/path", but again, that's unlikely to be necessary. Many (most?) projects have moved on from GOPATH oriented to being Go modules; modules do not require GOPATH.

coderj001 commented 5 months ago

Thanks man. You can close this issue.