mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-01 12:17:25 -05:00
Andersbakken/rtags@cdff9b47fc -> Andersbakken/rtags@db39790fda Sarcasm/irony-mode@ec6dce7ee1 -> Sarcasm/irony-mode@5063d6b16d ananthakumaran/tide@296c0e0e3a -> ananthakumaran/tide@28137ed904 brianc/jade-mode@111460b056 -> brianc/jade-mode@1ad7c51f3c cython/cython@aea4e6b84b -> cython/cython@5b325c9860 dgutov/robe@fd972e912d -> dgutov/robe@11207bd549 dominikh/go-mode.el@34974346d1 -> dominikh/go-mode.el@32cbd78c0a emacs-lsp/lsp-pyright@72fd57643d -> emacs-lsp/lsp-pyright@d428dbcf18 emacs-typescript/typescript.el@2a58631230 -> emacs-typescript/typescript.el@e824162051 galaunay/poetry.el@d5163fe065 -> galaunay/poetry.el@5b9ef569d6 hlissner/emacs-counsel-css@f7647b4195 -> hlissner/emacs-counsel-css@8e9c0515fc hlissner/emacs-pug-mode@d08090485e -> hlissner/emacs-pug-mode@73f8c2f95e jorgenschaefer/pyvenv@045ff9476d -> jorgenschaefer/pyvenv@31ea715f21 necaris/conda.el@4de6eccda5 -> necaris/conda.el@7a34e06931 pythonic-emacs/anaconda-mode@4f367c768a -> pythonic-emacs/anaconda-mode@cbea0fb318 wbolster/emacs-python-pytest@31ae5e0e68 -> wbolster/emacs-python-pytest@b603c5c7f2
lang/go
Table of Contents TOC
Description
This module adds Go support, with optional (but recommended) LSP support via gopls.
- Code completion (
gocode
) - Documentation lookup (
godoc
) - Eldoc support (
go-eldoc
) - REPL (
gore
) - Syntax-checking (
flycheck
) - Auto-formatting on save (
gofmt
) (requires:editor (format +onsave)
) - Code navigation & refactoring (
go-guru
) - File templates
- Snippets
- Generate testing code (
go-gen-test
) - Code checking (
flycheck-golangci-lint
)
Module Flags
+lsp
Enables integration for the gopls LSP server. It is highly recommended you use this, as the non-LSP experience is deprecated (and poor).
Plugins
- go-mode
- go-eldoc
- go-guru
- gorepl-mode
- go-tag
- company-go*
DEPRECATED
- go-gen-test
- flycheck-golangci-lint (if
:checkers syntax
is enabled)
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)gotests
(for generate test code)gomodifytags
(for manipulating tags)
export GOPATH=~/work/go
go install github.com/x-motemen/gore/cmd/gore@latest
go install github.com/stamblerre/gocode@latest
go install golang.org/x/tools/cmd/godoc@latest
go install golang.org/x/tools/cmd/goimports@latest
go install golang.org/x/tools/cmd/gorename@latest
go install golang.org/x/tools/cmd/guru@latest
go install github.com/cweill/gotests/gotests@latest
go install github.com/fatih/gomodifytags@latest
golangci-lint
(optional: for flycheck to integrate golangci-lint results) it is recommended to not usego get
to install this one, check the documentation.