-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.dir-locals.el
More file actions
16 lines (14 loc) · 927 Bytes
/
.dir-locals.el
File metadata and controls
16 lines (14 loc) · 927 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
;; -*- lexical-binding: t -*-
;; this add `include' additional paths to flycheck (linter) and
;; company-mode (auto-completion) correctly fetch the headers of the project.
((nil . ((eval . (let* ((src-path (concat (projectile-project-root) "src/"))
(include-path (list src-path))
(clang-argument (list
(format "-I%s"
src-path))))
;; install:
;; sudo snap install universal-ctags (apt version is outdated)
;; sudo update-alternatives --install /usr/bin/ctags ctags /snap/bin/universal-ctags 1111
(setq-local projectile-tags-command "ctags -Re -f \"%s\" %s src/")
(setq-local flycheck-clang-include-path include-path)
(setq-local company-clang-arguments clang-argument))))))