summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGrégoire Duchêne <gduchene@awhk.org>2020-04-11 19:12:53 +0100
committerGrégoire Duchêne <gduchene@awhk.org>2020-04-11 19:12:53 +0100
commitc3da3ac675d64f3aea19e10eac206ea2c108ce9b (patch)
tree504b0b2c65b1dbf8a16b18a7a748e0bfb40cc965
parent791599b0dcd61161438664eb5ab6f599ce622ec3 (diff)
emacs: Use goimports to format Go code
-rw-r--r--emacs/init.el1
1 files changed, 1 insertions, 0 deletions
diff --git a/emacs/init.el b/emacs/init.el
index fc5f8f0..357a2f8 100644
--- a/emacs/init.el
+++ b/emacs/init.el
@@ -60,6 +60,7 @@
(add-hook 'c++-mode-hook (lambda () (google-set-c-style)))
(add-hook 'go-mode-hook
(lambda ()
+ (setq-local gofmt-command "goimports")
(setq-local tab-width 2)
(add-hook 'before-save-hook 'gofmt-before-save nil t)))
(add-hook 'ibuffer-mode-hook