diff options
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=. |