angular-ui / AngularJS-sublime-package

AngularJS code completion, snippets, go to definition, quick panel search, and more.
MIT License
1.42k stars 169 forks source link

[Request] Make Sublime play nice with <script> templates #21

Closed robclancy closed 11 years ago

robclancy commented 11 years ago

If possible can you make is so when inside a <\script template="text/ng-template"> it is handled as html instead of JavaScript? Since it is handled as JS I can't use emmet in there.

Or if there is some setting for this direct me to it?

subhaze commented 11 years ago

@robclancy It looks like your message got cut off?

robclancy commented 11 years ago

Yeah I used < s cript> in there and it got stripped, editing now.

subhaze commented 11 years ago

Unfortunately there is no way to inject scopes via Sublime Text API. The only workaround that I can think of would be creating a new syntax file for HTML to treat script tags with template="text/ng-template" as a HTML element instead of embedded JS.

robclancy commented 11 years ago

Alright thanks.

subhaze commented 11 years ago

Reopening this and will investigate in more detail over the weekend. We will have to assign/create a ng syntax file, but, would be nice to have this option.