summaryrefslogtreecommitdiff
path: root/jakob.org
diff options
context:
space:
mode:
authorJakob L. Kreuze2019-03-29 20:40:00 -0400
committerJakob L. Kreuze2019-03-29 20:40:00 -0400
commit4ac21f0f356d3c063e4ae2fc41313fe8f5fd69e4 (patch)
tree32d243c8e828c003acbfc1b00bcd5a4b749cf3f3 /jakob.org
parentf3c2bf4142da75b57d786de04c23ae1b26032f11 (diff)
Add configuration for C++
Diffstat (limited to 'jakob.org')
-rw-r--r--jakob.org27
1 files changed, 27 insertions, 0 deletions
diff --git a/jakob.org b/jakob.org
index 17ef077..ba985c2 100644
--- a/jakob.org
+++ b/jakob.org
@@ -1974,6 +1974,33 @@ Enable [[company]], [[Flycheck]], and ElDoc, all provided by =irony-mode=.
(irony-mode . irony-eldoc))
#+END_SRC
+** C++
+
+Even though the [[https://www.kernel.org/doc/html/v4.10/process/coding-style.html][Linux kernel coding style]] was written to address [[C]], I feel its
+viewpoints on indentation apply equally as well to C++.
+
+#+BEGIN_SRC elisp
+(use-package cc-mode
+ :straight nil
+ :hook
+ (c++-mode . (lambda ()
+ (setq indent-tabs-mode t)
+ (c-set-style "linux")))
+#+END_SRC
+
+Enable [[company]], [[Flycheck]], and ElDoc, all provided by =irony-mode=.
+
+#+BEGIN_SRC elisp
+ :hook
+ (c++-mode . company-mode)
+ (c++-mode . flycheck-mode)
+ (c++-mode . eldoc-mode))
+
+(use-package irony
+ :hook
+ (c++-mode . irony-mode))
+#+END_SRC
+
** Emacs Lisp
Enable [[company]] for both =lisp-interaction-mode= and =emacs-lisp-mode=.

© 2015 - 2026 Jakob L. Kreuze