HTML (Angular.js) Syntax highlight
LeonardoGentile opened this issue · 1 comments
I've been trying to apply a proper syntax highlight for ng-whatever html attributes.
I've modified the provided AngularJs.tmLanguage adding:
<key>tag-ng-attribute</key>
<dict>
<key>match</key>
<string>\b(ng-[a-zA-Z\-:]+)</string>
<key>name</key>
<string>entity.other.attribute-name.ng.html</string>
</dict>
right after tag-generic-attribute.
Then I've added:
<dict>
<key>include</key>
<string>#tag-ng-attribute</string>
</dict>
right after the #tag-generic-attribute dict.
Then I chose the HTML(Angular.js) syntax for my html page and when I inspect the scope for <div ng-view=""></div> I always get
text.html.basic.angularjs meta.tag.any.html entity.other.attribute-name.html
Am I doing something wrong? Do you have any example of syntax highlight for your AngularJS.tmLanguage definition?
Thanks
The easiest way to update .tmLanguage files is to convert the xml to JSON (for me at least). Which, honestly, is still somewhat of a pain to work with.
This package can do that https://sublime.wbond.net/packages/SerializedDataConverter
Make updates to the JSON, then convert back.
Here is a link to the TextMate Grammar docs http://manual.macromates.com/en/language_grammars