在Eclipse中出现自动完成错误。

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

Error with autocomplete in Eclipse

问题

我正在运行安装了GoClipse和NodeClipse的Eclipse 4.6.3版本。我已经在首选项 -> Go 中配置了Go。

我希望Go的自动补全功能能够正常工作。然而,它给我报错:writing to process input broken pipe

请参考下面的截图,其中包含了错误信息和配置信息。

在Eclipse中出现自动完成错误。

在Eclipse中出现自动完成错误。

在Eclipse中出现自动完成错误。

我该如何解决这个问题?

英文:

I am running Eclipse 4.6.3 with GoClipse and NodeClipse installed. I have configured Go in Preferences -> Go.

I want autocomplete to work for Go. However, it is giving me the error: writing to process input broken pipe

See screenshots below for error and configuration.

在Eclipse中出现自动完成错误。

在Eclipse中出现自动完成错误。

在Eclipse中出现自动完成错误。

How do I fix this problem?

答案1

得分: 7

至少在第二页上,所有的路径都似乎是错误的。你提供了源代码的路径,而对话框要求提供可执行文件的路径。

为了确保你已经安装了所有的工具,请在终端中运行以下命令:

go get -u github.com/nsf/gocode
go get -u golang.org/x/tools/cmd/guru
go get -u github.com/rogpeppe/godef

现在,对于每个工具运行以下命令:

which <工具名>
# 例如:
which guru
# => /Users/user/gocode/bin/gocode

将输出复制到配置界面的可执行文件字段中。

对于gofmt,你应该可以简单地勾选“使用默认位置”。

英文:

At least on the second page, all of the paths seem wrong. You supplied the path to the source code where the dialog asks for the path to the executable.

To make sure you have all the tools installed run the following commands in the terminal:

go get -u github.com/nsf/gocode
go get -u golang.org/x/tools/cmd/guru
go get -u github.com/rogpeppe/godef

Now, for each of the tools run

which &lt;tool&gt;
# example:
which guru
# =&gt; /Users/user/gocode/bin/gocode

Copy the output into the Executable: field in the config screen.

For gofmt you should be able to simply tick "Use default location"

huangapple
  • 本文由 发表于 2017年7月14日 02:40:42
  • 转载请务必保留本文链接:https://go.coder-hub.com/45088651.html
匿名

发表评论

匿名网友

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

确定