2017-04-27 18:02:54 -04:00
|
|
|
* Go
|
|
|
|
|
|
|
|
Go support, including auto-completion, eldoc support (go-eldoc), REPL support,
|
|
|
|
refactoring commands, syntax-checking (flycheck), auto-formatting (gofmt) and
|
|
|
|
snippets (yasnippet).
|
|
|
|
|
|
|
|
+ [[https://golang.org][Homepage]]
|
2017-04-27 18:14:03 -04:00
|
|
|
+ [[https://github.com/hlissner/emacs-snippets/tree/master/go-mode][Snippets]]
|
2017-04-27 18:12:44 -04:00
|
|
|
+ [[../../feature/file-templates/templates/go-mode][File templates]]
|
2017-04-27 18:02:54 -04:00
|
|
|
|
|
|
|
** Installation
|
|
|
|
*** MacOS
|
|
|
|
#+BEGIN_SRC sh :results output
|
|
|
|
brew install go
|
|
|
|
#+END_SRC
|
|
|
|
|
|
|
|
*** Arch Linux
|
|
|
|
#+BEGIN_SRC sh :dir /sudo:: :results output
|
|
|
|
pacman --needed --noconfirm -S go
|
|
|
|
#+END_SRC
|
|
|
|
|
|
|
|
** Dependencies
|
|
|
|
You'll need to set up ~GOPATH~. This is mine:
|
|
|
|
|
|
|
|
#+BEGIN_SRC sh
|
|
|
|
export GOPATH=~/.go
|
|
|
|
#+END_SRC
|
|
|
|
|
|
|
|
Then install the necessary packages:
|
|
|
|
|
|
|
|
#+BEGIN_SRC sh :results output
|
|
|
|
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
|
|
|
|
#+END_SRC
|
|
|
|
|