gandm / language-babel

ES2017, flow, React JSX and GraphQL grammar and transpilation for ATOM
https://atom.io/packages/language-babel
MIT License
476 stars 81 forks source link

Use a ligature for </> #486

Open cpojer opened 6 years ago

cpojer commented 6 years ago

React Fragments have a special JSX syntax. I'm using FiraCode and noticed that in Atom, the ligature for <> is applied but for </> it is not. Could this be fixed? I'm happy to help make a fix if you point me to the place and how to test it.

The ligature for </> is listed here: https://github.com/tonsky/FiraCode

See carbon

Thanks!

gandm commented 6 years ago

This isn't straightforward as I use special css markers to allow my autoindentJSX to work. This causes <, > and /> to be logically separated. I'm pretty sure that <> isn't working using FiraCode either as these are two distinct spans in the css. In short, to support this change I would need to amend the autoindentjsx code quite a bit.

sam3d commented 5 years ago

This would be a really cool feature to have! Is there any way that <> and </> could be tokenised without messing up the autoindentjsx code? I'm happy to take a look depending on complexity.