Clang highlighter for C++
After installing, simply go to the settings and change C++ Recolored > Libclang Path (
It is also recommended that you change the highlighting color to match your theme (C++ Recolored > Type Color or
Expect this extension to become obsolete when either an API for VSCode semantic highlighting is implemented or when the LSP implements semantic highlighting, both of which give the C/C++ extension an opportunity to seamlessly implement this feature.
Can I use a compilation database to provide flags?
Yes, in fact C++ Recolored automatically looks for
Can I manually provide flags?
Yes, in the case where C++ Recolored cannot find
Why aren't header files being highlighted?
Make sure you're using the latest version of LLVM (which adds the functionality of automatically finding corresponding header file flags in a compilation database).
IF you're using an older version of LLVM; this is usually because the header file is not defined in the
Why isn't it instant?
To provide true semantic highlighting C++ Recolored utilizes libclang, which parses the file from the perspective of a compiler. So far, to maximize performance, compilation database flags are cached, libclang re-parses, and existing highlights are retained for each file in memory.
Why do I need to save to see highlighting changes?
This is so that it is not parsed unnecessarily (for example when a line is incomplete and therefore contains invalid syntax). However, the libclang API does support in-memory (unsaved file buffer) parsing, which may be implemented in the future.