atom / one-dark-syntax

Atom One dark syntax theme
MIT License
448 stars 236 forks source link

Highlight JSON keys #29

Closed darylrobbins closed 9 years ago

darylrobbins commented 9 years ago

At present, JSON keys are highlighted in the same color as string values (green), which almost defeats the purpose of syntax highlighting for these files. I have used YAML as the model for highlighting the JSON keys to provide a consistent experience.

Before: screenshot 2015-05-20 14 26 39

After: screenshot 2015-05-20 14 24 43

simurai commented 9 years ago

That's a great improvement.

Although the red feels a bit strong. How do you like using a more neutral @light-gray instead:

screen shot 2015-05-21 at 4 22 27 pm

darylrobbins commented 9 years ago

The light gray feels too subtle for the dominant structure element of the document, particularly when I compare it to how other file types render:

screenshot 2015-05-21 08 08 11 screenshot 2015-05-21 08 08 33 screenshot 2015-05-21 08 09 25

There are one or two dominant colors (often red) that highlight the structure of the files.

And the most important comparison, YAML -- a sister format for JSON:

screenshot 2015-05-21 08 47 07

In my opinion, we likely want to have a consistent set of colors across the various config formats: json, yaml, java properties, ini. This makes it much less jarring to move from one to the other as one often has to do. It also makes it easier to focus on the structure as opposed to the syntax of these files.

Since we already have a color set established for YAML, why not just apply this to other formats?

darylrobbins commented 9 years ago

I made a couple small updates, in addition to fixing a bug with nested strings, I gave keywords (true, false, null) their own color (cyan) instead of sharing orange with numbers.

screenshot 2015-05-21 08 35 15

simurai commented 9 years ago

Since we already have a color set established for YAML, why not just apply this to other formats?

Yeah, this makes sense. I'm also playing around with brightening the colors a bit, so red would look less buddy. -> https://github.com/atom/one-dark-syntax/pull/30

simurai commented 9 years ago

@darylrobbins thanks for adding this. :bow: