Home > Blockchain >  VSCode, Javascript - change syntax color for data types
VSCode, Javascript - change syntax color for data types

Time:01-26

What is the scope selector for changing the syntax color of data types (Number, String, Boolean) with textMateRules?

"editor.tokenColorCustomizations": {
 "[Monokai Pro (Filter Spectrum)]": {
   "textMateRules": [
     {
       "scope": ["???"],
       "settings": {
         "foreground": "#ff6188"
       }
     }
   ]
 }

NOTE: I dont want to change theme. Im trying to only change the color of data types from white Preview

How to find the TextMate Scope

  1. Open Command Palette and search for "Developer: Inspect Editor Tokens and Scopes"
  2. Place your mouse caret on top of the code you wish to change its color
  3. The TextMate scope you're looking for is usually the first line of "textmate scopes"

textmate scope preview

CodePudding user response:

You have to change your color theme in VS Code. For example the color theme you're using is Monokai. The required theme seems to be Dark italic.

Step 1

  • So to change your theme first head on to extensions tab and search for Dark Italic and install it. The sample of Dark Italic is enter image description here

Step 2

  • Hit ctrl K ctrl T and Select Dark Italic.

CodePudding user response:

Bottom left of your screen select settings then go to Color Theme

enter image description here

Then, Select Dark (default Theme)

enter image description here

  • Related