diff options
Diffstat (limited to 'lisp/programming/c++.el')
| -rw-r--r-- | lisp/programming/c++.el | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/lisp/programming/c++.el b/lisp/programming/c++.el new file mode 100644 index 0000000..5dca93b --- /dev/null +++ b/lisp/programming/c++.el @@ -0,0 +1,29 @@ +;;; c++.el -*- lexical-binding: t; -*- +;;; +;;; Author: Jakob L. Kreuze <zerodaysfordays@sdf.org> +;;; URL: https://git.sr.ht/~jakob/.emacs.d/ +;;; +;;; Configuration of a development environment for the C++ programming language. +;;; + +(use-package cc-mode + :straight nil + ;; Even though the Linux kernel coding style [1] was written to address C, I + ;; feel its viewpoints on indentation apply equally as well to C++. + ;; + ;; [1]: https://www.kernel.org/doc/html/v4.10/process/coding-style.html + :hook + (c++-mode . (lambda () + (setq indent-tabs-mode t) + (c-set-style "linux"))) + + ;; Enable company, Flycheck, and ElDoc, integration for all of which is + ;; provided by `irony-mode'. + :hook + (c++-mode . company-mode) + (c++-mode . flycheck-mode) + (c++-mode . eldoc-mode)) + +(use-package irony + :hook + (c++-mode . irony-mode)) |