JavaScript variable highlight


Hey guys, is there any way to highlight the variables that are shown grey in the picture?1


In order for colors to be applied to a piece of text, the grammar package needs to be able to identify what the text is used for in the code without knowing anything about how to actually run the language (though work is underway to make Atom smarter in that way). Based on what the grammar package tells it, Atom will give important bits of text span tags, with classes that give the theme something to highlight. You can find out if a specific piece of text has been matched by the grammar by using the dev tools (View -> Developer -> Toggle Developer Tools) and running a search (ctrl-f) in the Elements tab for unique strings like upsert and $add.


Oh, it seems that my additional grammar library for js (language-javascript-jsx) wasn’t automatically selecting itself as main grammar for file extensions “.mjs”.
Now it’s all working as intended, thanks for the help <3


Do i need to close the topic now, like in github or do i just leave it?


This is a normal web forum, not an issue tracker.