subtleGradient / language-javascript-jsx

JavaScript with JSX Bundle for Atom
45 stars 6 forks source link

Fira Code ligatures (and maybe others ligatures too?) broken #26

Open cloud-walker opened 8 years ago

cloud-walker commented 8 years ago

this is Plain Text image

this is JavaScript with JSX image

As u can see most ligatures are broken... Also the fat arrow ligature seems not broken in my example but when you use it in real code:

image

:cry:

BenoitAverty commented 8 years ago

I would also like to see this fixed :)

dem4gus commented 8 years ago

I've encountered this as well using Haskelig. I've tracked the issue down to how the grammar is tokenizing these specific multi-character operators. A similar issue is described in atom/language-javascript/issues/252. For comparison, here is how the operator is being tokenized by language-javascript-jsx:

screen shot 2016-08-04 at 15 33 49

Instead of being keyword operator assignment js and keyword operator relational js they should both be tokenized together as storage type function arrow js, which is what language-javascript currently does:

screen shot 2016-08-04 at 15 37 57

BenoitAverty commented 8 years ago

As a workaround, I installed the package https://atom.io/packages/language-babel which had the least amount of tokenization issue between the three (language-javascript-jsx, language-javascript and language-babel)