amkrajewski / TDB-Highlighter

VS Code Language Extension provides syntax highlighting for the Thermodynamic DataBase (TDB) files used in the CALPHAD community to describe thermodynamic models of properties of materials.
MIT License
9 stars 0 forks source link

VSCODE Dark mode default coloration bad #5

Closed amr8004 closed 10 months ago

amr8004 commented 10 months ago

Parameter, phase name, element default coloration are defaulting to almost the same color defeating the purpose of differentiating. Consider changing phase name color in this theme

amkrajewski commented 10 months ago

Hi @amr8004! The root cause is that Modern Dark is explicitly defining "markup.bold" and "markup.heading"(corresponding to elements and phases, respectively) as following the exact same rendering style. To be precise:

{
    "scope": "markup.bold",
    "settings": {
        "foreground": "#569CD6",
        "fontStyle": "bold"
    }
},
{
    "scope": "markup.heading",
    "settings": {
        "foreground": "#569CD6",
        "fontStyle": "bold"
    }
}

I will see what I can do about it, but for now I suggest you try one of other dark themes.

amkrajewski commented 10 months ago

After investigating, it seems like this behavior is not possible to adjust on the lexer (our) side, as there is no alternative combination of bold and color in the theme. However, you can quickly customize the theme yourself:

  1. Open settings.json, for instance by Ctrl+Shift+P to bring up the command menu and typing settings
  2. Add the following code block to it, to "steal" markup.heading formatting from Monokai theme.
"editor.tokenColorCustomizations": {
   "[Default Dark Modern]": {
      "textMateRules": [
      {
         "scope": "markup.heading",
         "settings": {
             "foreground": "#D0B344"
         }
      }
      ]
   }
},
  1. Done!
amkrajewski commented 10 months ago
Screenshot 2023-11-07 at 14 01 14
amkrajewski commented 10 months ago

Current (V1.3.2) README in the root directory addresses this issue through instructions similar to the above ones.