SublimeText / CoffeeScript

Syntax highlighting and checking, commands, shortcuts, snippets, watched compilation and more.
440 stars 64 forks source link

Doesn't support coffee-react #180

Closed Ahrengot closed 10 years ago

Ahrengot commented 10 years ago

First off, I love the Better CoffeeScript package. It's one of my favorite sublime packages!

However I just ran into some trouble after installing Coffe React and starting to use .cjsx files. Better CoffeeSript throws errors when saving like Syntax error: [stdin]:7:5: error: unexpected <

I'm assuming this is because the HTML markup inside of the coffee files confuse the compiler. Would it be possible to turn off those checks for .cjsx files? I really like this package and it's a little annoying having to disable it every time I work with a cjsx file.

I don't know how sublime packages work, but if I can help in any other way, please let me know.

markalfred commented 10 years ago

It'd be better to use this package for syntax highlighting as it now looks like it supports coffee.

Better Coffeescript determines whether to auto-compile a file by checking if you're using the Better Coffeescript syntax highlighting on the given file. Presumably, you'd never want .cjsx files to be compiled by coffee, because it's not valid coffee syntax. So switching your syntax highlighter will resolve this issue while also highlighting your .cjsx files more appropriately. Cheers!

Ahrengot commented 10 years ago

@markalfred this is perfect! Thank you.

markalfred commented 10 years ago

:thumbsup: Awesome, happy to help!