Sublime Forum

Plugins not working for JSON files

#1

I have Sublime 3. When i pulled up a JSON file, i got no formatting. So, i installed a bunch of plugins in an effort to get some coloring and formatting. After installing the following, all i got was a blue color for the word “true” and everything else is in white in the JSON file. The other file, which is a LESS code, gets coloring after all these plugins were installed using Package Control.

Emmet
JsFormat
HTML/CSS/JS Prettify
LESS
Pretty JSON
Bracket Highlighter
Package Control

Perhaps some of these packages are redundant, but since i am new to these packages, i am trying them all out. Let me know if i can remove any of these. Thanks.

0 Likes

#2

The bottom two at least, Bracket Highlighter and Package Control, won’t be interfering with your JSON stuff. Have no experience with some of the others, so can’t comment on that.

0 Likes

#3

There are two compontents responsible for syntax coloring in Sublime Text: Syntax Definitions and Color Schemes. I suspect that one of them is causing problems.

In order to find out what it actually is, you can:

  1. manually change the syntax highlighting of a JSON file to “JSON” (using the menu, status bar or command palette); alternatively try “JavaScript”
  2. change your color scheme (also using the menu).
0 Likes

#4

[quote=“FichteFoll”]There are two compontents responsible for syntax coloring in Sublime Text: Syntax Definitions and Color Schemes. I suspect that one of them is causing problems.

In order to find out what it actually is, you can:

  1. manually change the syntax highlighting of a JSON file to “JSON” (using the menu, status bar or command palette); alternatively try “JavaScript”
  2. change your color scheme (also using the menu).[/quote]

I tried changing the color scheme of the *.json file and it does not change anything except the background & foreground colors. You message seems to imply that i should be seeing different colors for different components of JSON files. At the least, i was expecting separate coloring for keys & values. But all words come out in the same color - I don’t see any separation of colors between strings/numbers/arrays etc.

I am not sure what you mean by your 1st point above. My javascript, html, css, LESS files all show proper syntax coloring in them. Have you tried JSON file using any of the packages i mentioned above ? Do you see different colors for different words ?

0 Likes