From 6c950aca9d1205067fdc5687eb68134936d3a783 Mon Sep 17 00:00:00 2001 From: Tom Willemse Date: Sun, 6 May 2018 23:47:00 -0700 Subject: Add C++ configuration --- emacs/.emacs.d/init.org | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/emacs/.emacs.d/init.org b/emacs/.emacs.d/init.org index cb1420a..5310a6b 100644 --- a/emacs/.emacs.d/init.org +++ b/emacs/.emacs.d/init.org @@ -1268,6 +1268,39 @@ Computing Environment". (add-hook 'cmake-mode-hook 'electric-pair-local-mode) #+END_SRC +** C++ + :PROPERTIES: + :header-args: :tangle "init/oni-cpp-init.el" + :END: + + #+BEGIN_SRC emacs-lisp :tangle yes + (with-eval-after-load 'cc-mode (load "oni-cpp-init")) + #+END_SRC + + Enable electric pairing. + + #+BEGIN_SRC emacs-lisp + (add-hook 'c++-mode-hook 'electric-pair-local-mode) + #+END_SRC + + Enable syntax checking using flycheck. + + #+BEGIN_SRC emacs-lisp + (add-hook 'c++-mode-hook 'flycheck-mode) + #+END_SRC + + Enable completions using company-mode. + + #+BEGIN_SRC emacs-lisp + (add-hook 'c++-mode-hook 'company-mode) + #+END_SRC + + Show the right margin of any C++ file. + + #+BEGIN_SRC emacs-lisp + (add-hook 'c++-mode-hook 'fci-mode) + #+END_SRC + * Applications - [[file:init/dired-init.org][Dired]] :: The Emacs file manager. Very powerful, and I don't use it -- cgit v1.2.3-54-g00ecf