Showing posts with label liteide. Show all posts
Showing posts with label liteide. Show all posts

2014-08-23

Installing Go 1.3.1 with LiteIDE x23.2 on Arch Linux

So I installing new computer on my company, using Arch Linux as usual.

How to install Go? it's really easy when using yaourt, just type:

yaourt --needed --noconfirm -S --force go mercurial git bzr subversion liteide gdb

Go took about 40.76 MB
Mercurial, Git, Bzr and Subversion requires about 13.12 MB
LiteIDE took about 13.14 MB
Gdb took about 3.06 MB

Set your working directory:

mkdir ~/go
export GOPATH=~/go
export PATH=$PATH:~/go/bin


I suggest that you should put those environment variables on .bashrc

Then you can test the installation, create a file named test1.go

package main
import "fmt"
func main() {
  fmt.Println("Hello my lovely PC :3")
}


Run it using:

go run test1.go 

or

go build test1.go && ./test1

or press Ctrl+R on LiteIDE.

2014-07-31

How to set Komodo Edit as Go IDE with komodo-go

LiteIDE 23.1 is quite good enough IDE for Go in my opinion, the autocomplete and method hint works fine. All we need after installing is just configure the Environment file (View > Edit Environment) such as this:

GOROOT=/usr/lib/go
GOBIN=/home/kyz/Dropbox/go/bin

Don't forget to change the ownership or you won't able to save:

sudo chown `whoami` /usr/share/liteide/liteenv/*

Also don't forget to add custom GOPATH (View > Manage GOPATH..) if necessary


But sometimes the jump to declaration feature doesn't work at all.
There are another alternative that is komodo-edit, you can install it using:

pacman -Sy komodo-edit

Then you could clone the komodo-go repository:

cd /tmp
git clone https://github.com/Komodo/komodo-go
cd komodo-go

Make sure that you have installed Python 2.x, and then just built the extension

/opt/komodo-edit/lib/sdk/bin/koext build

Then drag the .xpi file into Komodo Extension Manager.
Now, install godef to make it support jump to declaration command:

go get -u -v code.google.com/p/rog-go/exp/cmd/godef

Now your komodo-edit with Go integration will work as expected.