To install this package, run in Emacs:
M-x package-install RET js2-mode RET
_separator in numbers (i.e., numeric separator) (#584).
M-x imenuwill now list test blocks defined with
for await ofsyntax (#543).
js2-minor-mode(see README), rather than
js2-jsx-modewill now trigger a warning in Emacs 27.
js2-include-*-externsare now evaluated on demand. As a result, they can now be effectively used as file- or directory-local variables.
js2-mode-assume-strict, for use with ES6 modules.
js2-object-property, which has no color by default.
js2-getter-setter-nodeis renamed to
js2-method-node, together with its related functions. It already handles generator methods, and we added support for async methods (see below), so the old name would get more confusing.
js2-jsx-mode, deriving from
js2-mode. Supports indentation of JSXElement expressions wrapped within parentheses or as function arguments. Indentation is customizable via
js2-modenow derives from
js-mode. That means the former function will run
js-mode-hook, as well as
js2-mode-hook. The key bindings will default to
js-mode-mapwhere they're not set in
js2-mode-map. And in Emacs 25 or later (including the snapshot builds),
js2-modeuses the indentation code from
js-mode. Where feasible, the user options (and functions) now have aliases, but if you're using Emacs 25 and you see an indentation-related setting that stopped working, try looking for a corresponding one in the ... ...