summaryrefslogtreecommitdiff
path: root/emacs
diff options
context:
space:
mode:
authorGrégoire Duchêne <gduchene@awhk.org>2020-10-17 11:53:33 +0100
committerGrégoire Duchêne <gduchene@awhk.org>2020-10-17 11:53:33 +0100
commit2f1cdaee165b1b22684744367e2891303401255f (patch)
tree86a9b3319fa35749f1d82669ba719b660031ad75 /emacs
parent08330e7c1f318bc5c5d24789284d4e7d0f950a92 (diff)
emacs: Configure google-c-style with use-package
Diffstat (limited to 'emacs')
-rw-r--r--emacs/init.el5
1 files changed, 4 insertions, 1 deletions
diff --git a/emacs/init.el b/emacs/init.el
index 68a5d2b..c520410 100644
--- a/emacs/init.el
+++ b/emacs/init.el
@@ -71,6 +71,10 @@
(use-package diminish :ensure t)
+(use-package google-c-style
+ :hook (c++-mode . google-set-c-style)
+ :ensure t)
+
(use-package ivy
:config (ivy-mode 1)
:bind (:map ivy-minibuffer-map ("C-w" . ivy-backward-delete-char))
@@ -107,7 +111,6 @@
(add-hook 'bazel-mode-hook (setq bazel-mode-buildifier-before-save t))
(add-hook 'before-save-hook 'delete-trailing-whitespace)
-(add-hook 'c++-mode-hook (lambda () (google-set-c-style)))
(add-hook 'go-mode-hook
(lambda ()
(setq-local gofmt-command "goimports")