cpptheme
cpptheme is a Visual Studio Code extension for C++ development environments. It
provides additional C++ syntax highlighting, keybindings, Simplified Chinese
localization, a product icon theme, and color themes.
Make
Building requires Node.js, Git, npm, and vsce:
npm install --global @vscode/vsce
node build.js
The resulting extension package is written to .build/cpptheme.vsix.
To install the generated extension locally, ensure that the code command is
available and run:
node install.js
Usage
After making changes, ensure that node build.js completes successfully. The
main project components are described below.
Grammars
contributes/grammars/ contains TextMate grammar rules injected into the C++
grammar. These rules currently cover modules, noexcept, preprocessor
directives, and punctuation.
Keybindings
contributes/keybindings/ contains the keybinding update table and the
implementation that rewrites user keybindings. Changes to update.json must
remain valid VS Code keybinding entries.
Localizations
contributes/localizations/ contains replacement and update tables for the
Simplified Chinese localization. The build script retrieves upstream
translations from microsoft/vscode-loc and applies these rules to the
generated files.
Product Icon Themes
contributes/product-icon-themes/ contains the product icon theme definition.
During the build, the required font is obtained from @vscode/codicons and
written to .build/.
Themes
contributes/themes/ contains the editor color themes. cpptheme-light.json
is generated from cpptheme-dark.json during the build. Changes affecting
both themes should be made to the dark theme and the color mapping in
build.js. cpptheme-tokyo.json is maintained independently.
License
This project is distributed under the GNU General Public License version 3.
See license.txt for the full license text.