Rewrite doctor; move warn! blocks out in doctor.el files
This commit is contained in:
parent
5c36519dab
commit
74c8b1d113
16 changed files with 193 additions and 147 deletions
|
@ -78,25 +78,17 @@
|
|||
:commands (go-guru-describe go-guru-freevars go-guru-implements go-guru-peers
|
||||
go-guru-referrers go-guru-definition go-guru-pointsto
|
||||
go-guru-callstack go-guru-whicherrs go-guru-callers go-guru-callees
|
||||
go-guru-expand-region)
|
||||
:config
|
||||
(unless (executable-find "guru")
|
||||
(warn! "Couldn't find guru. Refactoring commands (go-guru-*) won't work")))
|
||||
go-guru-expand-region))
|
||||
|
||||
|
||||
(def-package! gorepl-mode
|
||||
:commands (gorepl-run gorepl-run-load-current-file)
|
||||
:config
|
||||
(unless (executable-find "gore")
|
||||
(warn! "Couldn't find gore. REPL will not work")))
|
||||
:commands (gorepl-run gorepl-run-load-current-file))
|
||||
|
||||
|
||||
(def-package! company-go
|
||||
:init (setq command-go-gocode-command "gocode")
|
||||
:when (featurep! :completion company)
|
||||
:init (setq command-go-gocode-command "gocode")
|
||||
:after go-mode
|
||||
:config
|
||||
(setq company-go-show-annotation t)
|
||||
(set! :company-backend 'go-mode '(company-go))
|
||||
(unless (executable-find command-go-gocode-command)
|
||||
(warn! "Couldn't find gocode. Code completion won't work")))
|
||||
(set! :company-backend 'go-mode '(company-go)))
|
||||
|
|
12
modules/lang/go/doctor.el
Normal file
12
modules/lang/go/doctor.el
Normal file
|
@ -0,0 +1,12 @@
|
|||
;;; lang/go/doctor.el -*- lexical-binding: t; -*-
|
||||
|
||||
(unless (executable-find "guru")
|
||||
(warn! "Couldn't find guru. Refactoring commands (go-guru-*) won't work"))
|
||||
|
||||
(unless (executable-find "gore")
|
||||
(warn! "Couldn't find gore. REPL will not work"))
|
||||
|
||||
(when (and (featurep! :completion company)
|
||||
(require 'company-go nil t))
|
||||
(unless (executable-find command-go-gocode-command)
|
||||
(warn! "Couldn't find gocode. Code completion won't work")))
|
Loading…
Add table
Add a link
Reference in a new issue