Open zabojad opened 8 years ago
It's not really trivial: I don't think XML syntax would be compatible with JSX, first (because of attributes, mainly), so you should probably test this first. Maybe we could have a look at how existing react plugins solve this (https://github.com/facebookarchive/sublime-react).
JSX is basically pure XML code with haxe code embedded within curly braces... Nothing else. This would definitively be enough for a first round.
Can you give the big picture of how to add a syntax support to the haxe sublime text plugin?
Hi there !
How hard would that be to add support for the JSX highlighting with the excellent haxe-react library?
Basically, I think a first (and possibly easy) way to do this would be to apply XML syntax highlighting to anything within a
jsx('...')
call.Event better would be to override it with haxe syntax highlighting for everything within
{ ... }
withinjsx(' ... ')
.Here is a JSX snippet example: