Firacode: Workaround for JavaScript ligatures in Atom

Created on 18 Nov 2015  路  6Comments  路  Source: tonsky/FiraCode

As pointed out (#69, #59) some ligatures (e.g. !==) don't work well in Atom for JavaScript.

Using language-babel or language-javascript-jsx instead of the standard language-javascript package seems to fix this.

Most helpful comment

In case anyone else is still having this problem, I fixed it by switching out language-javascript-jsx. I replaced it with language-babel and everything is working perfectly.

All 6 comments

The problem is that _language-js_ expands a !== b into:

<span class="source js">
    a
    <span class="keyword operator js">!=</span>
    <span class="keyword operator js">=</span>
    b
</span>

instead of:

<span class="source js">
    a
    <span class="keyword operator js">!==</span>
    b
</span>

And ligatures do not work across spans. This isn't fixable on FiraCode's side.

But it's fixable on Atom's side (hence workaround).

My experience is that the following language packages work for JavaScript:

  • language-javascript-jsx
  • language-babel

You already need some fiddling with the Atom stylesheet to make ligatures work, so mentioning _language-javascript_ as an issue as well seems appropriate.

PR: https://github.com/tonsky/FiraCode/pull/72

The real issue will apparently be fixed upstream soon

it鈥檚 fixed there now, so this can be closed

My arrow ligature only works inside a div.
screen shot 2017-05-08 at 2 24 32 pm

In case anyone else is still having this problem, I fixed it by switching out language-javascript-jsx. I replaced it with language-babel and everything is working perfectly.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

blucell picture blucell  路  4Comments

aolko picture aolko  路  3Comments

alis0nc picture alis0nc  路  3Comments

hatched picture hatched  路  3Comments

ghivert picture ghivert  路  4Comments