Sublime Forum

JSON color scheme broken

#1

It used to show different colors for keys and values, and also different colors for each level of indentation in JSON files.

This is broken in the recent updates, every key and value are the same color no matter which color scheme I choose.

theme: material theme
sublime text version: 3207

0 Likes

#2
0 Likes

#3

Thanks for your suggestion, I did some investigation and found that the scope name’s been changed in recent releases, which is likely to be the reason for the problem.

Here is what a nested scope looks like now:

source.json meta.mapping.value.json meta.sequence.json meta.mapping.value.json meta.sequence.json meta.mapping.value.json meta.sequence.json meta.mapping.value.json meta.mapping.key.json string.quoted.double.json

and in my previously working themes, they are like this:

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.array.json meta.structure.array.json meta.structure.array.json string.quoted.double.json

and this:

source.json meta meta meta meta.structure.dictionary.json string.quoted.double.json - meta meta meta meta.structure.dictionary.json meta.structure.dictionary.value.json string.quoted.double.json, source.json meta meta meta meta.structure.dictionary.json punctuation.definition.string - meta meta meta meta.structure.dictionary.json meta.structure.dictionary.value.json punctuation.definition.string

0 Likes

#4

I made some modifications to the theme file and it’s working now:

meta.structure.dictionary.value.json —> meta.mapping.value.json
meta.structure.dictionary.json —> meta.mapping.key.json
meta.structure.array.json —> meta.sequence.json

3 Likes