github-vscode-theme icon indicating copy to clipboard operation
github-vscode-theme copied to clipboard

JSON in JavaScript files doesn't use the new colors for property names

Open SL-Lee opened this issue 3 years ago • 1 comments

Thanks for the fix regarding the color for property names in JSON files (#303). However, JSON objects in JavaScript files still uses the old colors for property names (see the screenshot below), so it would be great if the same change can be applied to JSON objects in JavaScript files as well.

image

SL-Lee avatar Jul 19 '22 17:07 SL-Lee

I figured out that you can currently achieve this via token color customizations in VS Code as a temporary workaround:

"editor.tokenColorCustomizations": {
  "[GitHub Dark Default]": {
    "textMateRules": [
      {
        "scope": [
          "meta.object-literal.key.js string.quoted.double.js",
          "meta.object-literal.key.js string.quoted.single.js"
        ],
        "settings": {
          "foreground": "#7EE787"
        }
      }
    ]
  }
},

Which results in the desired colors being applied for JSON property names in JavaScript files:

image

SL-Lee avatar Jul 19 '22 18:07 SL-Lee

👋🏼 Thanks for raising this PR. The current colour of the JSON property names in JS files are matching with github.com . Please see the screenshot below. The goal of this theme is to stay as close to github.com as possible and you can read more about the motivation here. I'm marking this issue as closed but please let us know if you have any concerns 🙌🏼

A JSON obj screenshot taken from github.com

broccolinisoup avatar Jan 05 '23 02:01 broccolinisoup