emacs-lsp / emacs-ccls

Emacs client for ccls, a C/C++ language server
200 stars 29 forks source link

Trying to setup .dir-locals.el with blacklists/whitelists but it is not working #64

Closed hisnawi closed 4 years ago

hisnawi commented 4 years ago

I use this setup to setup blacklists for ccls in my project:

(
(prog-mode (ccls-initialization-options . (:index (:blacklist [
"^/Users/xxx/proj/dir1/"
"^/Users/xxx/proj/dir2/(dir3|dir4)/"])))
)

How do I make it dependent on (projectile-project-root) instead?

This didn't work:

(
 (nil . ((eval . (progn
                   (require 'projectile)
                   (setq ccls-initialization-options (:index
                                                      (:blacklist
                                                       (vector
    (concat "^" (projectile-project-root) "dir1/")
    (concat "^" (projectile-project-root) "dir2/(dir3|dir4)/"))))))))))
)