Closed zhongweiy closed 5 years ago
I find setting the ccls-skipped-range-face
to nil
can get the highlighting back.
I have not debugged into it. And if any log or information needed, please tell me.
These ranges are skipped by clang because the #if
#ifdef
#else
branch isn't taken.
In the following case,
#ifdef A
int a;
#else
int b;
#endif
There is at least one skipped range. You may say that the file is compiled twice with -DA
or without it, but each file is only indexed once.
You can also set (setq ccls-enable-skipped-ranges nil)
if you don't like skipped ranges.
Hi, there, In my project, some cpp file have syntax highlight but some have not at all. I even have seen a cpp file which half of it have syntax highlight but the other half doesn't (but this case can not be reproduced after revert-buffer).
And if put the cursor on the keyword (like
if
) of the cpp file doesn't have syntax highlight and call thedescribe-face
gives the Face:Face: ccls-skipped-range-face
. Is it caused by some issue in emacs-ccls? How can I get back my syntax highlight? Thanks!