mappum / js-hyperx

Atom syntax highlighting for hyperx
10 stars 0 forks source link

js-hyperx and vomit library #1

Open bredele opened 8 years ago

bredele commented 8 years ago

Hey @mappum I was wondering if js-hyperx would work with my library (http://github.com/bredele/vomit) or yoyo (http://github.com/naxogden/yo-yo). Could you please confirm?

mappum commented 8 years ago

Yes, it should work. But right now it is hardcoded to only do the HTML syntax highlighting if the template function name is hx. I'm still not sure the best way to support other function names, but I'm thinking about making it either autodetect HTML inside any template string and applying the highlighting to that, or just supporting more hardcoded function names (vomit, html, yo, etc.). Any thoughts about a good way to handle this?

bredele commented 8 years ago

@mappum I am not really familiar with atom configuration but you could use the the regexp 'begin': '[^A-Fa-f0-9_\\-^]\w'` to target all words before the back-tick.

mappum commented 8 years ago

Right, but I'd prefer not to match all words because then it will attempt to do HTML highlighting for any template string that uses a function, and you might have some which are not HTML.

On Oct 19, 2016 3:46 PM, "Olivier Wietrich" notifications@github.com wrote:

@mappum https://github.com/mappum I am not really familiar with atom configuration but you could use the the regexp 'begin': '[^A-Fa-f0-9_-^]\w`' to target all words before the back-tick.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/mappum/js-hyperx/issues/1#issuecomment-254963073, or mute the thread https://github.com/notifications/unsubscribe-auth/AAYTzcFBWmp1whM-kQ0iaoGr1eKgoSUJks5q1p3egaJpZM4KbaBv .