0

I use vim-go plugin and it can autocompletion the build in framework such as "fmt", "os" etc. But cannot completion third party framework.

heramerom
  • 151
  • 1
  • 1
  • 8
  • I think `vim-go` needs to know your GOPATH. If you export it in your shell before starting `vim`, I think that's what it takes (but I'm not a vim-go user). More about setting GOPATH [here](http://stackoverflow.com/questions/20628918/cannot-download-gopath-not-set/20629533#20629533). – twotwotwo Jan 22 '16 at 04:12
  • Thank's, I was already export GOPATH, but cannot work. – heramerom Jan 22 '16 at 05:35
  • Use the plugin's issue tracker. – romainl Jan 22 '16 at 08:24

2 Answers2

1

Yes it can.You need to install the gocode daemon, which you can do via :GoInstallBinaries once vim-go is installed.

See the README for more details.

elithrar
  • 23,364
  • 10
  • 85
  • 104
1

Oh... It's my fault, I didn't config the gocode

➜  ~ gocode set lib-path "$GOPATH/pkg/darwin_amd64"
lib-path "$GOPATH/pkg/darwin_amd64"
➜  ~ 
➜  ~ gocode set
propose-builtins true
lib-path "$GOPATH/pkg/darwin_amd64"
autobuild true
force-debug-output ""
package-lookup-mode "go"
➜  ~ 

Now, it works well!

heramerom
  • 151
  • 1
  • 1
  • 8