I want to use autocompletion, but can't get gocode (https://github.com/nsf/gocode) working.
The editor of my choice is Brackets (using https://github.com/David5i6/Brackets-Go-IDE). But I can't get it working with vim+vundle or komodo either.
My folder structure:
~/Documents/goDev/bin/
test
gocode
/src/
github/
jonas/
test/
test.go
nfs/
gocode/
...
From my .profile:
export GOPATH=/Users/jonas/Documents/goDev
export PATH=$PATH:/usr/local/bin:/usr/local/go/bin/:/Users/jonas/Documents/goDev/bin
With go env i get:
...
GOPATH="/Users/jonas/Documents/goDev"
...
GOROOT="/usr/local/go"
GOTOOLDIR="/usr/local/go/pkg/tool/darwin_amd64"
...
Is there something I did wrong with my setup? Or have I maybe missed something else?
Thanks in advance
Add the following to your .profile and log out and back in:
export GOROOT=/usr/local/go
This got gocode working for me with LiteIDE.
Often gocode is working correctly, but the editor does not find gocode.
Test if gocode is working correctly:
Terminal 1
Terminal 2:
See results in Terminal 1.
If gocode seems to be working:
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