diff options
| author | Jakob L. Kreuze | 2019-03-29 20:40:00 -0400 |
|---|---|---|
| committer | Jakob L. Kreuze | 2019-03-29 20:40:00 -0400 |
| commit | 4ac21f0f356d3c063e4ae2fc41313fe8f5fd69e4 (patch) | |
| tree | 32d243c8e828c003acbfc1b00bcd5a4b749cf3f3 /jakob.org | |
| parent | f3c2bf4142da75b57d786de04c23ae1b26032f11 (diff) | |
Add configuration for C++
Diffstat (limited to 'jakob.org')
| -rw-r--r-- | jakob.org | 27 |
1 files changed, 27 insertions, 0 deletions
@@ -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=. |