简体   繁体   中英

How to enable autocomplete in GoClipse?

The instructions how to install GoClipse have been followed.

I'm not getting any autocomplete stuff happening at all, either for local packages that I write, for built in stuff, or for GAE stuff (I have downloaded Go src to the SDK folder as the wiki states).

Are there any settings that I can check to ensure it is set up correctly? Is autocomplete supposed to work in the current version?

As the GoClipse with AppEngine article you linked to says:

We assume the reader has a working copy of GoClipse running in their Eclipse environment.

so that's not the article you want to refer to. Instead, check for GoClipse .

The auto completion is named content assist in eclipse. The GoClipse features state:

Now delivered with content assist via Gocode for Windows, OS X 64bit, and Linux 64bit.

Gocode is an auto-completion daemon. So you will also have to install and run that one besides your eclipse + GoClipse.

There is a bug in the current version of Goclipse for the Linux platform. It currently delivers a prebuilt version of gocode for Windows, 64 bit OS X, and 64 bit Linux. I have only been able to test it locally with limited resources, so I really depend on users to report the problems they find at:

http://code.google.com/p/goclipse/issues/list

If you are having problems, I urge you to download and install gocode into your $GOROOT/bin directory and see if that helps. Otherwise, the fix will come in the next release in a few days.

Also, sorry for causing you any trouble and thank you for trying Goclipse.

If you are not using a gocode upstream (but the one shipped with Eclipse) on Linux you are also no be able to build your application with CRTL+F11, although just clicking in Run->Run is going to work.

So, I strongly recommend to update your gocode on Linux, as simple as:

   $ sudo GOPATH=/opt/go/ go  get -u github.com/nsf/gocode 

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM