Skip to content

Commit

Permalink
chore: Refine local Emacs config
Browse files Browse the repository at this point in the history
* Drop settings which were moved to default values of my configs.
* Add gcc settings.
* Better syntax.

Signed-off-by: Alexander Kurbatov <[email protected]>
  • Loading branch information
Alexander Kurbatov authored and Alexander Kurbatov committed Oct 23, 2021
1 parent 1505e2d commit a640a0b
Showing 1 changed file with 14 additions and 15 deletions.
29 changes: 14 additions & 15 deletions .dir-locals.el
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
;;; Directory Local Variables
;;; For more information see (info "(emacs) Directory Variables")

((nil
(eval . (let ((root (projectile-project-root)))
(add-to-list 'auto-mode-alist '("\\.h\\'" . c++-mode))
(setq-local flycheck-cppcheck-standards "c++14")
(setq-local flycheck-clang-language-standard "c++14")
(setq-local flycheck-clang-include-path
(list (concat root "build")
(concat root "src")
(concat root "contrib/cpp-sc2/include")
(concat root "contrib/cpp-sc2/contrib/protobuf/src")
(concat root "contrib/cpp-sc2/generated")
(concat root "build/contrib/cpp-sc2/generated")))))))
((c++-mode
(flycheck-cppcheck-standards . "c++14")
(flycheck-clang-language-standard . "c++14")
(flycheck-gcc-language-standard . "c++14")
(eval progn (let
((local-include-paths
(list (concat (projectile-project-root) "build")
(concat (projectile-project-root) "src")
(concat (projectile-project-root) "contrib/cpp-sc2/include")
(concat (projectile-project-root) "contrib/cpp-sc2/contrib/protobuf/src")
(concat (projectile-project-root) "contrib/cpp-sc2/generated")
(concat (projectile-project-root) "build/contrib/cpp-sc2/generated"))))
(setq flycheck-clang-include-path local-include-paths)
(setq flycheck-gcc-include-path local-include-paths)))))

0 comments on commit a640a0b

Please sign in to comment.