4

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 Answer 1

2

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.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.