dqwh1119 2014-08-16 19:33
浏览 193

Gocode自动完成功能不起作用

I want to use autocompletion, but can't get gocode (https://github.com/nsf/gocode) working.

The editor of my choice is Brackets (using https://github.com/David5i6/Brackets-Go-IDE). But I can't get it working with vim+vundle or komodo either.

  • The GOPATH wasn't set by the GO installation
  • I set the GOPATH and PATH just like the instruction specified and can work on go projects just fine.

My folder structure:

~/Documents/goDev/bin/
                      test
                      gocode
                 /src/
                     github/
                            jonas/
                                  test/
                                       test.go
                             nfs/
                                  gocode/
                                       ...

From my .profile:

export GOPATH=/Users/jonas/Documents/goDev
export PATH=$PATH:/usr/local/bin:/usr/local/go/bin/:/Users/jonas/Documents/goDev/bin

With go env i get:

...
GOPATH="/Users/jonas/Documents/goDev"
...
GOROOT="/usr/local/go"
GOTOOLDIR="/usr/local/go/pkg/tool/darwin_amd64"
...

Is there something I did wrong with my setup? Or have I maybe missed something else?

Thanks in advance

  • 写回答

2条回答 默认 最新

  • dongmibeng5885 2014-11-07 18:18
    关注

    Add the following to your .profile and log out and back in:

    export GOROOT=/usr/local/go
    

    This got gocode working for me with LiteIDE.

    评论

报告相同问题?

悬赏问题

  • ¥200 总是报错,能帮助用python实现程序实现高斯正反算吗?有偿
  • ¥15 对于squad数据集的基于bert模型的微调
  • ¥15 为什么我运行这个网络会出现以下报错?CRNN神经网络
  • ¥20 steam下载游戏占用内存
  • ¥15 CST保存项目时失败
  • ¥15 树莓派5怎么用camera module 3啊
  • ¥20 java在应用程序里获取不到扬声器设备
  • ¥15 echarts动画效果的问题,请帮我添加一个动画。不要机器人回答。
  • ¥15 Attention is all you need 的代码运行
  • ¥15 一个服务器已经有一个系统了如果用usb再装一个系统,原来的系统会被覆盖掉吗