wiki:Tools/Go

Tooling for Go

usually outdated

sudo apt-get install golang

build your own

cd /opt
git clone git://github.com/golang/go
cd /opt/go
git clean -Xdf
cd src
./all.bash
export GOROOT=/opt/go
export PATH=$GOROOT/bin:$PATH
export GOPATH=$HOME/go
export PATH=$GOPATH/bin:$PATH

Linter

go get -u golang.org/x/lint/golint

Editor's support

go get -u github.com/nsf/gocode

Language Server

go get -u github.com/sourcegraph/go-langserver

Emacs

(package-install 'go-mode)
(package-install 'go-eldoc)

in ~/.emacs

(add-hook 'go-mode-hook 'go-eldoc-setup)

Neovim

cd ~/.local/share/nvim/plugged/
git clone git://github.com/autozimu/LanguageClient-neovim.git
cd LanguageClient-neovim
cargo clean
cargo install --force

then in .config/nvim/init.vim

let g:LanguageClient_autoStart = 1

let g:LanguageClient_serverCommands = {
    \ 'go': ['go-langserver']
}
Last modified 2 years ago Last modified on Nov 12, 2018, 1:26:18 PM
Note: See TracWiki for help on using the wiki.