summaryrefslogtreecommitdiff
path: root/emacs/init.el
diff options
context:
space:
mode:
authorGrégoire Duchêne <gduchene@awhk.org>2021-06-19 09:32:17 +0100
committerGrégoire Duchêne <gduchene@awhk.org>2021-06-19 09:32:17 +0100
commit3a78cbdb064001c0a4fcec69936177d4297f7b6c (patch)
treedbb9c81c7f6a281f2e50e853001015fa1e48401f /emacs/init.el
parent01b48b3cd44cd08612c6b033b50feae2c96ff6e8 (diff)
emacs: Add Flycheck configuration
Also, use ‘bazel-buildifier-before-save’ instead of the deprecated ‘bazel-mode-buildifier-before-save’.
Diffstat (limited to 'emacs/init.el')
-rw-r--r--emacs/init.el10
1 files changed, 9 insertions, 1 deletions
diff --git a/emacs/init.el b/emacs/init.el
index 3cd4f3b..c3e7312 100644
--- a/emacs/init.el
+++ b/emacs/init.el
@@ -55,7 +55,7 @@
(scroll-bar-mode -1))
(use-package bazel
- :config (setq bazel-mode-buildifier-before-save t)
+ :config (setq bazel-buildifier-before-save t)
:ensure t)
(use-package cc-mode :bind (:map c++-mode-map ("C-c f" . clang-format)))
@@ -100,6 +100,14 @@
:after (evil diminish)
:ensure t)
+(use-package flycheck
+ :config
+ (setq flycheck-global-modes '(c++-mode go-mode))
+ (global-flycheck-mode)
+ :hook (c++-mode . (lambda () (setq flycheck-clang-language-standard "c++17")))
+ :after go-mode
+ :ensure t)
+
(use-package go-mode
:init
(when (executable-find "goimports")