Angular JS scope variables, syntax coloring?


I noticed that functions assigned to the $scope are colored as js support classes, which is good. However, there seems to be no way to assign syntax coloring to a $scope variable, as in $scope.radioModel = 'Left';

See attached, should there be a way to color that other $scopes?

EDIT: Yes, I have installed the “angularjs” package, but it is pretty lacking in any kind of syntax coloring.


What are the syntax scopes for the lines that aren’t colored the way you like?


That’s just it, it’s all just “source.js”


Even the 0 that is colored differently?


No, all numbers in every language are scoped constant.numeric, the equals sign is keyword.operator, and the semi-colon is punctuation.terminator. The rest is source.js


Ok … so which parts would you like to have different scopes and what scope do you think they should have?



I can se that this thread is pretty old, but I still think the topic is relevant. It would be really cool if Angular scope variables could have better syntax highlighting. I have attached a screenshot of how atom handles it today and a screenshot of how Webstorm handles it. I think that Webstorm is doing a pretty good job.

Atom vs. Webstom

Best Regards

Fine-grained scopes for C++ (or any language really)

+1, this would be great to have this kind of highlighting because it seems that there is a lack of information with Atom compared to Webstorm on this point :slightly_smiling: