Syntax highlighting has two stages: a language package assigns scopes to text ranges in the editor, and a theme assigns colours to scopes. Language packages use roughly the same set of scopes, so themes will look decent on most languages. Themes can also add specialised colours for particular languages.
If you want to add the C++ colour palette to other languages, you’d need to work out
- What scopes in C++ the
one-dark theme is colouring the way you like
- What scopes are being used in other languages instead
- Which colours to change to get the effect you want
Editor: Log Cursor Scope command to show the scope at the cursor.
You can apply the changes by writing them in your stylesheet (this will override the theme). You can find the scopes to target based on the
one-dark package scopes. Note that the scopes in the logging command have
scope-- prepended to each part when used in a stylesheet.