diff options
| author | Grégoire Duchêne <gduchene@awhk.org> | 2020-11-08 11:11:43 +0000 |
|---|---|---|
| committer | Grégoire Duchêne <gduchene@awhk.org> | 2020-11-08 14:39:34 +0000 |
| commit | 9dcf04373f70aa5db656aa0e9feb24bde996a440 (patch) | |
| tree | 652e0987c894a1835ca76c2f6b66b7df1e2c1554 | |
| parent | a173e951cd32aa3696c0e62d7fd9112a6bc390f8 (diff) | |
emacs: Only use goimports if found
| -rw-r--r-- | emacs/init.el | 3 |
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) |
