Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to use editor.tokenColorCustomizations in a VSCode theme?

1.15 added the ability to theme general aspects of the syntax scopes, I'm trying to simplify a theme with the generic tokens ('comments', 'variables' etc.), however editor.tokenColorCustomizations doesn't seem to work. Is there a variation that works or is it not intended for themes?

like image 455
Will Stone Avatar asked Aug 11 '17 13:08

Will Stone


People also ask

Can you use VS Code as a text editor?

Visual Studio Code: Free open source text editor created for developers writing code. Package manager: Software that is designed to help manage other programs that are installed or need to be installed on a device.

Can I customize VS Code theme?

You can customize your active Visual Studio Code color theme with the workbench. colorCustomizations user setting. Note: If you want to use an existing color theme, see Color Themes where you'll learn how to set the active color theme through the Preferences: Color Theme dropdown (Ctrl+K Ctrl+T).


1 Answers

Yes, those "generic tokens" are specific to the editor.tokenColorCustomizations setting (meaning you can't use them in a theme). They are mapped to TmLanguage scopes as follows:

comments: 'comment',
strings: 'string',
keywords: 'keyword',
numbers: 'constant.numeric',
types: 'entity.name.type',
functions: 'entity.name.function',
variables: 'variable'

https://github.com/Microsoft/vscode/pull/29393/files#diff-fcf8acf0156463f17f7fa7ed78c3b7e8R27

like image 116
Gama11 Avatar answered Oct 19 '22 23:10

Gama11