2015-02-03

How to build latest Go IDEA Plugin

As we already know, IntelliJ IDEA has the best Javascript and almost any other language auto-complete support, including database client and many useful linters and development tools. This tutorial intended to make IntelliJ as Go IDE, since last time I tried, the plugin (v0.9.6) is buggy and not good enough for daily use. First of all, the last plugin release (1.0.0-alpha11) is outdated, there's many bug that has been fixed after then. To build the latest package, use this command (or see first comment below for shorter command):

git clone --depth 1 git@github.com:go-lang-plugin-org/go-lang-idea-plugin.git
cd go-lang-idea-plugin
git checkout -b v1.0.0-alpha0
git branch --set-upstream-to=origin/v1.0.0-alpha0 v1.0.0-alpha0
git reset --hard origin/v1.0.0-alpha0
git pull
ln -s $YOUR_INSTALLED_IDEA_PATH idea-IC

alternatively, you can clone certain branch directly:

git clone -b v1.0.0-alpha0 https://github.com/go-lang-plugin-org/go-lang-idea-plugin.git
ln -s $YOUR_INSTALLED_IDEA_PATH idea-IC

Then open the directory using IntelliJ, open the File > Project Structure...


Make sure it has been configured as described in this link (rename the idea-IC SDK to IDEA sdk, assign that SDK to each module and project, install correct GrammarKit and ant plugin), when done, choose Build > Build Artifacts... > Go.zip to build the latest release on the bin/directory. Just install the zip file normally in plugins setting dialog. One more thing, to make this plugin works correctly, enter your $GOPATH value into Global Libraries and Project Libraries on Settings > Languages and Frameworks > Go Libraries. Voila! now your IDEA support Go programming language ^_^;


Or if building manually is taking too much of your time, you could download Go.zip file from this directory.