summaryrefslogtreecommitdiffstats
path: root/lisp/init-go-mode.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/init-go-mode.el')
-rw-r--r--lisp/init-go-mode.el6
1 files changed, 4 insertions, 2 deletions
diff --git a/lisp/init-go-mode.el b/lisp/init-go-mode.el
index 1b9a67e..7544879 100644
--- a/lisp/init-go-mode.el
+++ b/lisp/init-go-mode.el
@@ -4,6 +4,10 @@
(when (executable-find "goimports")
(setq gofmt-command "goimports"))
+ :bind (:map go-mode-map
+ ;; C-c p runs gofmt on the buffer
+ ("C-c p" . gofmt))
+
:config
;; run gofmt before saving file
(add-hook 'before-save-hook 'gofmt-before-save)
@@ -40,8 +44,6 @@ items follow a style that is consistent with other prog-modes."
(when (and (featurep 'company) (featurep 'company-go))
(setq-local company-backends '(company-go))
(company-mode 1))
- ;; C-c p runs gofmt on the buffer
- (define-key go-mode-map (kbd "C-c p") 'gofmt)
;; adjust fill-column
(setq-local fill-column 120)
;; use flat imenu index