Merge pull request #612 from seanpile/seanpile/go-mode-fixes

Small fixes for go-mode
This commit is contained in:
Henrik Lissner 2018-05-26 10:34:35 +02:00 committed by GitHub
commit 80fe6aa082
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 3 deletions

View File

@ -15,9 +15,11 @@
(when-let* ((goimports (executable-find "goimports")))
(setq gofmt-command goimports))
(setq gofmt-show-errors nil) ; Leave it to flycheck
(when (featurep! :feature syntax-checker)
(setq gofmt-show-errors nil) ; Leave it to flycheck
(add-hook 'go-mode-hook #'flycheck-mode))
(add-hook! 'go-mode-hook #'(flycheck-mode go-eldoc-setup))
(add-hook 'go-mode-hook #'go-eldoc-setup)
(add-hook! go-mode
(add-hook 'before-save-hook #'gofmt-before-save nil t))

View File

@ -9,5 +9,5 @@
(when (featurep! :completion company)
(require 'company-go)
(unless (executable-find command-go-gocode-command)
(unless (executable-find company-go-gocode-command)
(warn! "Couldn't find gocode. Code completion won't work")))