0

Sublime Text 3 doesn't highlight some JavaScript object properties.

Screenshot:

Screenshot of Sublime

Hopefully, the picture is pretty much self-explaining. Why doesn't my "this.description" property get the proper syntax highlight?

0

The syntax package is only part of the equation, the other is the color scheme. Different color schemes highlight code differently, even with the same syntax package in use. You seem to be using a variant of the Monokai scheme, but I cannot reproduce your issue with the bundled version of Monokai.

In general I recommend using Babel over the default JavaScript packagesince it supports ES6+ and JSX. Maybe that alone solves your problem, otherwise try a different color scheme.

| improve this answer | |
  • I'm not completely sure that Iunderstand you correctly, my theme is adaptive and the color scheme is Monokai. What do you mean by saying "syntax theme"? – tnsaturday May 31 '19 at 12:56
  • I’ve edited my answer to use consistent terms – idleberg May 31 '19 at 13:10
  • I've installed the Babel package, restarted ST and nothing changed. Then I basically tried ALL possible combinations of my color themes and it won't budge. If you use ST3 and everything seems ok to you, would you mind providing me screenshot of how it looks like in your editor? – tnsaturday May 31 '19 at 16:18
  • Demo in Sublime Text 3 (Dev Channel, Build 3208) gfycat.com/memorablecreepykangaroo – idleberg May 31 '19 at 18:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.