doomemacs/modules/lang/go/README.org

994 B

Go

Go support, including auto-completion, eldoc support (go-eldoc), REPL support, refactoring commands, syntax-checking (flycheck), auto-formatting (gofmt) and snippets (yasnippet).

Installation

MacOS

brew install go

Arch Linux

sudo pacman --needed --noconfirm -S go

Setup

You need to set up GOPATH before you can install lang/go's dependencies.

export GOPATH=~/work/go

go get -u github.com/nsf/gocode            # completion
go get -u github.com/motemen/gore          # REPL
go get -u golang.org/x/tools/cmd/guru      # code navigation commands
go get -u golang.org/x/tools/cmd/gorename  # refactoring commands