evanplaice / angular2-snippets

Sublime Text Snippets and Completions for
https://github.com/mgechev/angular2-style-guide
MIT License
44 stars 10 forks source link

Snippets working just in .js files #4

Closed scherman closed 8 years ago

scherman commented 8 years ago

As the title says, it's happening to me that i can use the snippets just in files which has ".js" extension. But using TypeScript i want to put the snippets in ".ts" files instead of ".js".

Do you know how to fix this?

evanplaice commented 8 years ago

Oh... right. I guess that'll only work for the .5% of users like me who use use angular2 + ES6. The snippets are designed to work with both TS and ES6 (ie with decorators/annotations enabled via Babel/Traceur).

To add Typescript support, the snippets/completions scope needs to be modified to include source.ts.

Source:

Feel free to submit a PR with the fix, otherwise I'll get to it soon.

evanplaice commented 8 years ago

@scherman Typescript support has been added in the latest.

Ref: 4ac2ad14