summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--emacs/init.el3
1 files changed, 2 insertions, 1 deletions
diff --git a/emacs/init.el b/emacs/init.el
index c0a2d7f..f59d64d 100644
--- a/emacs/init.el
+++ b/emacs/init.el
@@ -79,7 +79,8 @@
(use-package go-mode
:init
- (setq gofmt-command "goimports")
+ (when (executable-find "goimports")
+ (setq gofmt-command "goimports"))
(add-hook 'go-mode-hook
(lambda ()
(setq tab-width 2)