From 4ac21f0f356d3c063e4ae2fc41313fe8f5fd69e4 Mon Sep 17 00:00:00 2001 From: Jakob L. Kreuze Date: Fri, 29 Mar 2019 20:40:00 -0400 Subject: Add configuration for C++ --- jakob.org | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) (limited to 'jakob.org') 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=. -- cgit v1.3