Skip to content
/ gocode Public
forked from nsf/gocode

An autocompletion daemon for the Go programming language

License

Notifications You must be signed in to change notification settings

pruggia/gocode

Repository files navigation

Autocompletion/refactoring daemon for Go language.

Work in progress..

Currently available things:
 - .a (archive aka package) type info parser
 - type inference (more or less complete)
 - vim plugin (omnifunc autocompletion)
 - autocompletion

Screenshots:
 http://nsf.github.com/images/gocode1.png
 http://nsf.github.com/images/gocode2.png
 http://nsf.github.com/images/gocode3.png
 http://nsf.github.com/images/gocode4.png

Demo:
 http://nsf.110mb.com/gocode-demo.swf (3.6mb)

Short usage guide:

Everything is pretty simple. Just 'make install' it and make sure it
is available on your PATH (vim plugin assumes that).

In order to install vim plugin you need to have vim scripts installed
from the Go source tree ($GOROOT/misc/vim). After that just run
'update.sh' script from the 'vim' dir in the gocode source tree. It
will work on mac and linux (installs vim plugin files in ~/.vim/...).
Make sure you have 'filetype plugin on' in vim and you're done! Use
<C-x><C-o> for omnicompletion.

Daemon is started automatically and it is panic-safe. Means if it dies
with a panic during autocompletion, it will drop its cache and
continue serving requests. On panic it prints stack trace also. In order
to see a stack trace you may want to run it manually somewhere in the
terminal using this command: 'gocode -s'. If the daemon was started
previously, you can shut it down using this command: 'gocode close'.

IMPORTANT!!!: One of the latest Go releases relaxed a requirement for
having a bunch of environment variables in order to keep go compiler
working. But gocode still requires you to have them. Gocode needs these
environment variables in order to know where your libraries are:
GOOS, GOARCH, GOROOT. Probably in future this requirement will be changed
in favor of a config variable (like 'libpath' or something).

NOTE: I'm trying to keep git master branch always in a working state.
Therefore it's safe and a good idea to keep your app in sync with git
repo.

Bug reports:

If something doesn't work as expected, post your issues here:
http://github.com/nsf/gocode/issues

About

An autocompletion daemon for the Go programming language

Resources

License

Stars

Watchers

Forks

Packages

No packages published