These instructions were tested on openSUSE Tumbleweed and openSUSE Leap 15.1. There are some modules left that are not documented yet, but this already improves the sitution for common openSUSE users.
2.1 KiB
2.1 KiB
lang/go
Table of Contents TOC
Description
This module adds 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
) - File templates
- Snippets
Module Flags
This module provides no flags.
Plugins
Prerequisites
Go
To get started with Go, you need the go
tool:
MacOS
brew install go
Arch Linux
sudo pacman -S go
openSUSE
sudo zypper install go
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)
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