jdinhify/vscode-theme-gruvbox

json syntax highlighting changes color depending on the scope depth

K4LCIFER opened this issue · 1 comments

As you can see in the following image, the color of the keys changes depending on the scope depth:
image
this is rather strange behaviour. It should remain a constant color for every level of scope.

It should also be noted that the color of the values are affected as well.

From what I can see, it has to do with lines 646-680 in the theme files. For example, in gruvbox-dark-medium.json, (lines 646-680) we have

{
      "name": "JSON Level 0",
      "scope": [
        "source.json meta.structure.dictionary.json support.type.property-name.json"
      ],
      "settings": {
        "foreground": "#b8bb26"
      }
    },
    {
      "name": "JSON Level 1",
      "scope": [
        "source.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json support.type.property-name.json"
      ],
      "settings": {
        "foreground": "#8ec07c"
      }
    },
    {
      "name": "JSON Level 2",
      "scope": [
        "source.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json support.type.property-name.json"
      ],
      "settings": {
        "foreground": "#d3869b"
      }
    },
    {
      "name": "JSON Level 3",
      "scope": [
        "source.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json support.type.property-name.json"
      ],
      "settings": {
        "foreground": "#b8bb26"
      }

This is the source of the weirdness. I'm not entirely sure why this is all hardcoded in this way. I suspect that removing these lines might solve the problem.