diff --git a/.emacs.d/init.el b/.emacs.d/init.el index 1be8009..c85ae7b 100644 --- a/.emacs.d/init.el +++ b/.emacs.d/init.el @@ -109,8 +109,10 @@ (add-hook 'flycheck-after-syntax-check-hook 'flycheck-autolist-hook) (global-flycheck-mode) (setq flycheck-emacs-lisp-load-path "inherit") - (setq flycheck-clang-language-standard "-std=c++14") - (setq flycheck-clang-args '("-W" "-Wall"))) + (setq flycheck-clang-args '("-stdlib=libc++" "-W" "-Wall")) + (add-hook 'c++-mode-hook + (lambda () + (setq-local flycheck-clang-language-standard "c++14")))) (use-package company :init @@ -125,7 +127,9 @@ :config (add-hook 'after-init-hook 'global-company-mode) (global-set-key (kbd "M-/") 'company-complete) - (setq company-clang-arguments '("-std=c++14"))) + (add-hook 'c++-mode-hook + (lambda () + (setq-local company-clang-arguments '("-std=c++14"))))) ;; Latex (use-package tex-mik