4
votes

I'm a long time vim user looking to make the switch to emacs ... my vim kung fu is quite good but I suspect with emacs I can code even faster.

So far the Javascript syntax highlighting is inferior though. I've looked at https://github.com/mooz/js2-mode which says to install version 27, then install the package ... but that did nothing.

I'll post the different versions below. Am I missing something ?

Vim: vim coloration

Emacs: emacs coloration

Thanks !!

1

1 Answers

2
votes

To get the same font-locking for the object properties as the function calls, as shown in your vim example, you can M-xcustomize-face js2-object-property to inherit from font-lock-variable-name-face, or add an entry to custom-set-faces in your init

(custom-set-faces
 ;; ...
 '(js2-object-property ((t (:inherit font-lock-variable-name-face)))))

As you aren't getting any highlighting for function calls currently, it looks like you probably need to M-xpackage-reinstall js2-mode first.