Refactor lang/go

This commit is contained in:
Henrik Lissner 2017-05-26 11:44:06 +02:00
parent 42a63c661b
commit 9a4a196b69
3 changed files with 15 additions and 15 deletions

View File

@ -34,7 +34,7 @@ sudo pacman --needed --noconfirm -S go
** Dependencies
This module requires a valid ~GOPATH~, and the following Go packages:
+ ~gocode~ (for code completion)
+ ~gocode~ (for code completion & eldoc support)
+ ~godoc~ (for documentation lookup)
+ ~goimports~ (for auto-formatting code on save and fixing imports)
+ ~gorename~ (for extra refactoring commands)

View File

@ -45,6 +45,12 @@
:n "n" #'+go/test-nested))))
(def-package! go-eldoc
:after go-mode
:commands go-eldoc-setup
:config (add-hook 'go-mode-hook #'go-eldoc-setup))
(def-package! go-guru
:commands (go-guru-describe go-guru-freevars go-guru-implements go-guru-peers
go-guru-referrers go-guru-definition go-guru-pointsto
@ -55,6 +61,13 @@
(warn "go-mode: couldn't find guru, refactoring commands won't work")))
(def-package! gorepl-mode
:commands (gorepl-run gorepl-run-load-current-file)
:config
(unless (executable-find "gore")
(warn "go-mode: couldn't find gore, REPL support disabled")))
(def-package! company-go
:when (featurep! :completion company)
:after go-mode
@ -62,16 +75,3 @@
(if (executable-find command-go-gocode-command)
(set! :company-backend 'go-mode '(company-go))
(warn "go-mode: couldn't find gocode, code completion won't work")))
(def-package! go-eldoc
:commands go-eldoc-setup
:init (add-hook 'go-mode-hook #'go-eldoc-setup))
(def-package! gorepl-mode
:commands (gorepl-run gorepl-run-load-current-file)
:config
(unless (executable-find "gore")
(warn "go-mode: couldn't find gore, REPL support disabled")))

View File

@ -1,9 +1,9 @@
;; -*- no-byte-compile: t; -*-
;;; lang/go/packages.el
(package! go-mode)
(package! go-eldoc)
(package! go-guru)
(package! go-mode)
(package! gorepl-mode)
(when (featurep! :completion company)