Pictures worth a thousand words:
Currently it can differentiate and higlight the following C++ idioms:
Namespace
Class, Struct, Union, TypeAlias
Variable, GlobalVariable, MemberVariable, StaticMemberVariable
Function, MemberFunction, StaticMemberFunction
FunctionParameter
Enumeration, Enumerator
TemplateParameter, TemplateNonTypeParameter
Macro, PreprocessingDirective
It also greys out the skipped ranges between #ifdef...#endif preprocessing directives.
Semantic tokens are provided by the clang, extracted by the ycmd and obtained via YouCompleteMe plugin's frontend API, so in order to work DyeVim requires YouCompleteMe plugin to be installed.
Currently I am maintaining my own forks for ycmd and YouCompleteMe with changes required for the semantic tokens to work, but I hope that in time these changes will be merged back.
DyeVim works out of box and does not require any special configuration (assuming that YouCompleteMe is up and working normal), the only requirement is that it should be added to the Vim's runtimepath after YouCompleteMe.
If you are using Vundle:
Plugin davits/YouCompleteMe
Plugin davits/DyeVim
Currently only 2 colorschemes are supported: solarized and wombat256mod. If your colorscheme is not supported DyeVim will try its best to highlight your code by adding bold and italic modifiers to the existing colors.
You can also place your own coloring scheme in the autoload/dyevim/ft/cpp directory, named your_colorscheme.vim (see existing ones as an example).
This option sets query timeout in milliseconds for the tokens and skipped ranges. Note that request is a blocking operation and for worst case scenario Vim will be blocked by the specified amount, so it is not recomended to set timeout to >50 values.
Default: 10
let g:dyevim_timeout = 10
Since I mainly use gvim in my workflow, there is no terminal support... yet, sorry for that.
Thanks to the YouCompleteMe maintainers team for the inspiration, help and support.
I walked the path prepared by the color_coded plugin.