我安装了vim-gocode,但是无法自动完成我的Go代码。

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

I can’t autocomplete my Go code even after installing vim-gocode

问题

我的设置

我已经使用命令 go get github.com/nsf/gocode 安装了 gocode。

我使用 Pathogen 来管理我的 Vim 插件。我使用 git clone git@github.com:Blackrush/vim-gocode.git 安装了 vim-gocode。

我遇到的问题

:Fmt 命令可以正常工作,但是我无法自动完成我的 Golang 代码。它报告了一个错误,就像这张图片中显示的那样:

我安装了vim-gocode,但是无法自动完成我的Go代码。

有人可以帮助我吗?

英文:

My setup

I already installed gocode with the command go get github.com/nsf/gocode.

I use Pathogen to manage my Vim plugins. I installed vim-gocode with git clone git@github.com:Blackrush/vim-gocode.git.

What I’m seeing

The :Fmt command works ok, but I can’t autocomplete my golang code. It reports an error like in this image:

我安装了vim-gocode,但是无法自动完成我的Go代码。

Can someone help me?

答案1

得分: 1

请确保您已安装YCMneocomplete。您需要一些额外的二进制文件才能获得所有功能。在vim-go存储库中的以下内容告诉您如何安装它们。

> 应安装所有必要的二进制文件(如gocode、godef、goimports等)。您可以使用包含的:GoInstallBinaries命令轻松安装它们,通过在vim中运行该命令。

英文:

Please ensure you have YCM or neocomplete installed. You need some additional binaries to get all features. Following on the vim-go repo tells you how to install them.

> All necessary binaries should be installed (such as gocode, godef, goimports, etc.). You can easily install them with the included :GoInstallBinaries command, by running command in your vim.

huangapple
  • 本文由 发表于 2014年10月17日 11:52:59
  • 转载请务必保留本文链接:https://go.coder-hub.com/26417601.html
匿名

发表评论

匿名网友

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

确定