0

I'm a longtime vimmer switched to Emacs with Doom this year when I got a job writing Clojure. Writing JS this week I came across a maddening configuration that I can't figure out how to turn off. Various keywords are being shortened to ligature-like characters. I say ligature-like b/c I've used a non-ligature font and it's still doing it.

Affected keywords are import, return, function, and the empty arg list for an arrow function () => {}. When my cursor is on the keyword it reverts to the keyword. I've tried over and over to find the configuration setting to prevent these character swaps.

I'm not entirely sure it's js2-mode that's making the change, but when I switch modes to js-jsx-mode the keyword swapping goes away. Help me Obi-wan Kenobi, you're my only hope.

js2-mode changing keywords

js2-mode changing keywords

js2-mode with cursor over keyword

js2-mode with cursor over keyword

js-jsx-mode showing original keywords

js-jsx-mode showing original keywords

1
  • I found the config values js2-mode-abbrev-table and js2-mode-change-syntax-p that seem to hint at the idea of abbreviating or swapping syntaxes, but disabling them didn't appear to do anything meaningful in my js buffer.
    – localshred
    Dec 7 '20 at 16:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.