Closed hisnawi closed 4 years ago
Could you elaborate? I did the command line parsing just before I opened emacs, no file changes were made in between. Also what clang commands that might have changed you are referring to? Should my emacs ccls :confit change to reflect some identical clang commands as when using command line?
I am also willing to index only when opening emacs and not through the command line if I can get it to respect the blacklist I have. I am using this setup, yet when checking the ccls::stderr I still don't see the blacklist getting picked up in the "initialize.cc:290 I initializationOptions:" section.
(use-package ccls
:ensure t
:init
;;;###autoload
(defvar +ccls-blacklist
["^/Users/xxx/project/(dir1|dir2)/",
"^/Users/xxx/project/dir3/(dir4|dir5)"])
:config
(setq ccls-sem-highlight-method 'font-lock)
(ccls-use-default-rainbow-sem-highlight)
(setq ccls-extra-init-params '(:index (:blacklist ,+ccls-blacklist)))
(with-eval-after-load 'projectile
(add-to-list 'projectile-globally-ignored-directories ".ccls-cache")
)
(setq ccls-executable "/Users/xxx/gitrepos/ccls/Release/ccls")
(setq lsp-prefer-flymake nil)
(setq-default flycheck-disabled-checkers '(c/c++-clang c/c++-cppcheck c/c++-gcc))
:hook ((c-mode c++-mode objc-mode cuda-mode) . (lambda () (require 'ccls) (lsp)))
)
Ofter a deeper look I dont even find ccls-extra-init-params in ccls repo or ccls-emacs. Was this deprecated?
I have just started using ccls with lsp.
This is my emacs config:
I also try to index the project before I open emacs for the first time (no indexing yet) using this command:
~/gitrepos/ccls/Release/ccls -index=./ --init="
cat init.json"
This is the content of the init.json file:
This places all the indexing information in the .ccls-cache/ directory.
when opening emacs and when switching to the buffer ccls::stderr I find that ccls is indexing the full project again, without even taking blacklists I have in init.json into consideration.
How do I stop it from automatically indexing and just use whatever is in .ccls-cache directory?
I also like to mention that I have .ccls file in the project directory that contains all the include directories in the project and other flags: