:feature was a "catch-all" category. Many of its modules fit better in other categories, so they've been moved: - feature/debugger -> tools/debugger - feature/evil -> editor/evil - feature/eval -> tools/eval - feature/lookup -> tools/lookup - feature/snippets -> editor/snippets - feature/file-templates -> editor/file-templates - feature/workspaces -> ui/workspaces More potential changes in the future: - A new :term category for terminal emulation modules (eshell, term and vterm). - A new :os category for modules dedicated to os-specific functionality. The :tools macos module would fit here, but so would modules for nixos and arch. - A new :services category for web-service integration, like wakatime, twitter, elfeed, gist and pastebin services.
79 lines
2 KiB
Org Mode
79 lines
2 KiB
Org Mode
#+TITLE: lang/go
|
|
#+DATE: January 16, 2017
|
|
#+SINCE: v2.0
|
|
#+STARTUP: inlineimages
|
|
|
|
* Table of Contents :TOC:
|
|
- [[Description][Description]]
|
|
- [[Module Flags][Module Flags]]
|
|
- [[Plugins][Plugins]]
|
|
- [[Prerequisites][Prerequisites]]
|
|
- [[Go][Go]]
|
|
- [[Dependencies][Dependencies]]
|
|
- [[Features][Features]]
|
|
- [[Configuration][Configuration]]
|
|
- [[Troubleshooting][Troubleshooting]]
|
|
|
|
* Description
|
|
This module adds [[https://golang.org][Go]] support.
|
|
|
|
+ Code completion (~gocode~)
|
|
+ Documentation lookup (~godoc~)
|
|
+ Eldoc support (~go-eldoc~)
|
|
+ REPL (~gore~)
|
|
+ Syntax-checking (~flycheck~)
|
|
+ Auto-formatting on save (~gofmt~)
|
|
+ Code navigation & refactoring (~go-guru~)
|
|
+ [[../../editor/file-templates/templates/go-mode][File templates]]
|
|
+ [[https://github.com/hlissner/emacs-snippets/tree/master/go-mode][Snippets]]
|
|
|
|
** Module Flags
|
|
This module provides no flags.
|
|
|
|
** Plugins
|
|
+ [[https://github.com/dominikh/go-mode.el][go-mode]]
|
|
+ [[https://github.com/syohex/emacs-go-eldoc][go-eldoc]]
|
|
+ [[https://github.com/dominikh/go-mode.el][go-guru]]
|
|
+ [[https://github.com/manute/gorepl-mode][gorepl-mode]]
|
|
+ [[https://github.com/mdempsky/gocode][company-go]]*
|
|
|
|
* Prerequisites
|
|
** Go
|
|
To get started with Go, you need the ~go~ tool:
|
|
|
|
*** MacOS
|
|
#+BEGIN_SRC bash
|
|
brew install go
|
|
#+END_SRC
|
|
|
|
*** Arch Linux
|
|
#+BEGIN_SRC bash
|
|
sudo pacman -S go
|
|
#+END_SRC
|
|
|
|
** Dependencies
|
|
This module requires a valid ~GOPATH~, and the following Go packages:
|
|
|
|
+ ~gocode~ (for code completion & eldoc support)
|
|
+ ~godoc~ (for documentation lookup)
|
|
+ ~gorename~ (for extra refactoring commands)
|
|
+ ~gore~ (for the REPL)
|
|
+ ~guru~ (for code navigation & refactoring commands)
|
|
+ ~goimports~ (optional: for auto-formatting code on save & fixing imports)
|
|
|
|
#+BEGIN_SRC sh
|
|
export GOPATH=~/work/go
|
|
|
|
go get -u github.com/motemen/gore/cmd/gore
|
|
go get -u github.com/mdempsky/gocode
|
|
go get -u golang.org/x/tools/cmd/godoc
|
|
go get -u golang.org/x/tools/cmd/goimports
|
|
go get -u golang.org/x/tools/cmd/gorename
|
|
go get -u golang.org/x/tools/cmd/guru
|
|
#+END_SRC
|
|
|
|
* TODO Features
|
|
|
|
* TODO Configuration
|
|
|
|
* TODO Troubleshooting
|