mirror of
https://github.com/jimeh/.emacs.d.git
synced 2026-02-19 13:46:41 +00:00
Use gometalinter with flycheck for Go
This commit is contained in:
@@ -7,18 +7,22 @@
|
||||
;;; Code:
|
||||
|
||||
(require 'siren-programming)
|
||||
(siren-require-packages '(go-mode company-go go-eldoc go-projectile gotest))
|
||||
(siren-require-packages
|
||||
'(go-mode company-go go-eldoc go-projectile gotest flycheck-gometalinter))
|
||||
|
||||
(when (memq window-system '(mac ns))
|
||||
(exec-path-from-shell-copy-env "GOPATH"))
|
||||
|
||||
;; (setenv "GOPATH" (expand-file-name "~/.go"))
|
||||
;; (setq exec-path (cons "~/.go/bin" exec-path))
|
||||
;; (setenv "PATH" (concat "~/.go/bin" ":" (getenv "PATH")))
|
||||
|
||||
;; Ignore go test -c output files
|
||||
(add-to-list 'completion-ignored-extensions ".test")
|
||||
|
||||
(require 'flycheck-gometalinter)
|
||||
(setq flycheck-gometalinter-fast t)
|
||||
(setq flycheck-gometalinter-tests t)
|
||||
(setq flycheck-gometalinter-vendor t)
|
||||
(eval-after-load 'flycheck
|
||||
'(add-hook 'flycheck-mode-hook #'flycheck-gometalinter-setup))
|
||||
|
||||
(define-key 'help-command (kbd "G") 'godoc)
|
||||
|
||||
(eval-after-load 'go-mode
|
||||
|
||||
Reference in New Issue
Block a user