Angular JS scope variables, syntax coloring?


#1

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.


#2

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


#3

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


#4

Even the 0 that is colored differently?


#5

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


#6

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


#7

Hi,

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
Mads


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

+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: