LiteIDE没有自动完成 [英] LiteIDE no autocomplete

查看:413
本文介绍了LiteIDE没有自动完成的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图在Linux 32位上使用LiteIDE(Go IDE)。除了自动完成之外,一切都可以使用构建,运行,一切正常。 gocode 二进制文件似乎正在运行:

  ithisa @ miyasa〜 > ps aux | grep gocode 
ithisa 10003 0.0 0.0 823788 2624 pts / 1 Sl + 09:06 0:00 / home / ithisa / scratch / liteide / bin / gocode -s -sock unix -addr localhost:37373

我可能会做错什么?

解决方案您可能需要设置一个GOROOT =。要在LiteIDE中设置它,请查找环境工具栏;它应该是一个下拉菜单,可能是预先选择了系统和一个按钮。单击该按钮以显示编辑环境窗格,然后双击system.env或下拉框中选取的任何环境。



将开始 GOROOT = 的行更改为指向您的'go'目录。如果您从golang.org安装它,并且如果您不知道它在哪里,普通旧$ HOME / go是常用设置,则运行 go env 将显示 GOROOT Go工具链本身正在使用。当然,如果该行被注释掉( #GOROOT = ...),请删除。保存。



如果工具栏完全丢失,则视图 - >环境工具栏将取消隐藏它。

值得在 .bashrc 中设置GOROOT和相关设置,所以从命令行开始的工具看到它。我在我的homedir中安装了Go和LiteIDE,并且我的工作区是〜/ gocode ,所以我的是:

<$ p $ export PATH =$ HOME / go / bin:$ HOME / liteide / bin:$ PATH
export GOROOT = $ HOME / go
export GOPATH = $ HOME / gocode

我无法确定这是否是您的问题,但如果我将GOROOT解除了症状匹配你所看到的:完成适用于我的代码,但不适用于标准库。祝你好运!


I'm trying to use LiteIDE (the Go IDE) on Linux 32-bit. Everything works except for autocomplete. Builds, running, everything works. The gocode binary seems to be running tho:

ithisa@miyasa ~> ps aux | grep gocode
ithisa   10003  0.0  0.0 823788  2624 pts/1    Sl+  09:06   0:00 /home/ithisa/scratch/liteide/bin/gocode -s -sock unix -addr localhost:37373

What might I be doing wrong?

解决方案

You may need to set a GOROOT=. To set it within LiteIDE, look for the environment toolbar; it should be a a dropdown, probably with "system" preselected, and a button. Click the button to bring up the Edit Environment pane, then double-click "system.env", or whichever environment was picked in the dropdown.

Change the line that starts GOROOT= to point to your 'go' directory. Plain old $HOME/go is a common setting if you installed it from golang.org, and if you don't know where it is, running go env will show the GOROOT that the Go toolchain itself is using. And of course if the line is commented out (#GOROOT=...) remove the #. Save.

If the toolbar is missing entirely, View -> Environment toolbar unhides it.

It's probably also worth setting GOROOT and related settings in your .bashrc, so tools started from the command line see it. I installed Go and LiteIDE in my homedir and my workspace is ~/gocode, so mine is like:

export PATH="$HOME/go/bin:$HOME/liteide/bin:$PATH"
export GOROOT=$HOME/go
export GOPATH=$HOME/gocode

I can't be certain this is actually your issue, but if I unset my GOROOT the symptom matches what you're seeing: completion works on my code, but not on the standard library. Good luck!

这篇关于LiteIDE没有自动完成的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆