A theme dedicated for C/C++ programer.
C/C++ Theme utilizes power of semantic tokenization engine and the awesome Dracula Official Theme
, provides a systematic, consistent C/C++ programming experience.
In short, C/C++ Theme recognizes more C/C++ syntax symbols and renders them in a opinionated way. :) Below are some samples.
C/C++ Theme with MS C/C++ extension
C/C++ Theme with clangd extension
C/C++ Theme supports both MS C/C++ extension and clangd extension, and provides a consistent(similar but not exactly same) rendering result. If you want to know the exact tokens C/C++ Theme could support, please refer to below image:
Beside of recognizing of so many tokens, C/C++ Theme tries to have kind of design logic. It has these built-in principles to achieve the goal:
- Priority Design
- Scope has highest priority
- Then type
- Then readonly, or declaration, or other attributions
- Consistency Design
- Consistency between similar concepts, e.g., static variable shares similar UI with global variable
- Consistency between C and C++
- Consistency between MS C/C++ and clangd. C/C++ Theme leverages the two LSP to get semantic tokens, they generates different semantic token set and names, C/C++ Theme aggregate them into a uniform rendering.
- Consistency with the based theme Dracula Official. All the colors C/C++ Theme used are from the based theme.
- Style Design
underline is a very strong style, it was limited for kind of special tokens. e.g. static variable or static functions.
Why this name?
Similar with the Microsoft's C/C++ Themes? :) Just that themes are not so C/C++, I make this theme. I believe this them is more C/C++ than other. Just try it.
The support of C++.
I don't use much of C++, so there's only basic support to C++(maybe already enough). If you have better idea to render C++ tokens, welcome to contribute(PR or issue).
Why parameter uses
The first version of parameter is using the purple color to distinguish it from local variable, but I find this design is too strong and distractive. Then I tried to use some other color, no suitable color could find. The orange seems to be the only acceptable color. Imo, the differentiation between parameter and local variable is necessary, so
underline style is added to it.
Differentiation between MS C++ extension and clangd extension.
Both are the top end C/C++ LSP, in summary, clangd offers more precise token types than MS C++, especially to
function types, and it's fast. But MS C/C++ extension offers a more appropriate token set and better compatibility(only my personal experience based on daily usage).
To contribute or modify the theme, please refer to Here.