可以使用vim-go来完成第三方框架的补全。

huangapple go评论71阅读模式
英文:

Can vim-go completion third party framework

问题

我使用vim-go插件,它可以自动完成内置框架,如"fmt"、"os"等。但无法完成第三方框架的自动完成。

英文:

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

答案1

得分: 1

是的,可以。您需要安装gocode守护程序,可以在安装vim-go后通过:GoInstallBinaries命令来完成。

更多详细信息请参阅README

英文:

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.

答案2

得分: 1

哦...这是我的错,我没有配置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"
➜  ~ 

现在,它可以正常工作了!

英文:

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!

huangapple
  • 本文由 发表于 2016年1月22日 09:41:24
  • 转载请务必保留本文链接:https://go.coder-hub.com/34937623.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定