From 1202e25968a5163887c5eb7bb7097d02ebcea449 Mon Sep 17 00:00:00 2001 From: Aaron LI Date: Sat, 13 Jan 2018 11:22:58 +0800 Subject: spacemacs: add c++ hook and some small tweaks --- _spacemacs.d/init.el | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/_spacemacs.d/init.el b/_spacemacs.d/init.el index 80ad00a..4fcc90e 100644 --- a/_spacemacs.d/init.el +++ b/_spacemacs.d/init.el @@ -90,7 +90,7 @@ markdown (mu4e :variables mu4e-enable-mode-line t - mu4e-installation-path "~/.spacemacs.d/local/mu4e") + mu4e-installation-path "~/local/mu/share/emacs/site-lisp/mu4e") octave org python @@ -409,7 +409,7 @@ This function is called at the very end of Spacemacs initialization after layers configuration. You are free to put any user code." ;; - (setq-default tab-width 4) + (setq-default tab-width 8) (setq-default fill-column 78) ;; Put a newline at the end of file if there isn't already one there (setq-default require-final-newline t) @@ -470,12 +470,12 @@ ;; Credit: https://emacs.stackexchange.com/a/19364 (spacemacs/toggle-truncate-lines-off) (spacemacs/toggle-visual-line-navigation-on) - ;; + ;; Change `powerline' separator (setq powerline-default-separator 'slant) ;; Display tildes in the fringe on empty lines (global-vi-tilde-fringe-mode) - ;; + ;; Configure BibTeX completion for `helm-bibtex' (setq bibtex-completion-bibliography '("~/papers/references.bib")) (setq bibtex-completion-library-path "~/papers/") ;; where to find PDFs @@ -494,10 +494,16 @@ (setq org-ref-default-bibliography '("~/papers/references.bib") org-ref-pdf-directory "~/papers/" org-ref-bibliography-notes "~/papers/notes.org") - ;; + + ;; C++ mode + (add-hook 'c++-mode-hook + (lambda () + (setq flycheck-gcc-language-standard "c++14" + flycheck-clang-language-standard "c++14"))) + ;; ESS: Turn off the automatic replacement of `_' by `<-' (add-hook 'ess-mode-hook (lambda () (ess-toggle-underscore nil))) - ;; + ;; Set font only after the first GUI frame initialized, to workaround the ;; error when Emacs starts in daemon mode. (spacemacs|do-after-display-system-init -- cgit v1.2.2