summaryrefslogtreecommitdiff
path: root/emacs/init.el
diff options
context:
space:
mode:
authorGrégoire Duchêne <gduchene@awhk.org>2020-11-08 11:11:43 +0000
committerGrégoire Duchêne <gduchene@awhk.org>2020-11-08 14:39:34 +0000
commit9dcf04373f70aa5db656aa0e9feb24bde996a440 (patch)
tree652e0987c894a1835ca76c2f6b66b7df1e2c1554 /emacs/init.el
parenta173e951cd32aa3696c0e62d7fd9112a6bc390f8 (diff)
emacs: Only use goimports if found
Diffstat (limited to 'emacs/init.el')
-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)