Use js2-mode for additional Node.js extensions.
Node.js can file extensions to force ECMAScript (.mjs) versus CommonJS (.cjs) module systems. They're both JavaScript files so use js2-mode when editing them.
This commit is contained in:
parent
ce86286127
commit
b57ff48e09
2 changed files with 5 additions and 3 deletions
|
@ -23,6 +23,7 @@
|
||||||
* The keybinding for `proced` is now enabled unconditionally.
|
* The keybinding for `proced` is now enabled unconditionally.
|
||||||
* Replace prelude-go backend with `lsp` instead of unmaintained tools.
|
* Replace prelude-go backend with `lsp` instead of unmaintained tools.
|
||||||
* Use `rust-analyzer` as language server for prelude-rust and provide nicer syntax highlighting with `tree-sitter`.
|
* Use `rust-analyzer` as language server for prelude-rust and provide nicer syntax highlighting with `tree-sitter`.
|
||||||
|
* Use `js2-mode` for Node.js specific `.cjs` and `.mjs` extensions.
|
||||||
|
|
||||||
### Bugs fixed
|
### Bugs fixed
|
||||||
|
|
||||||
|
|
|
@ -36,6 +36,7 @@
|
||||||
(require 'js2-mode)
|
(require 'js2-mode)
|
||||||
|
|
||||||
(add-to-list 'auto-mode-alist '("\\.js\\'" . js2-mode))
|
(add-to-list 'auto-mode-alist '("\\.js\\'" . js2-mode))
|
||||||
|
(add-to-list 'auto-mode-alist '("\\.[cm]js\\'" . js2-mode))
|
||||||
(add-to-list 'auto-mode-alist '("\\.pac\\'" . js2-mode))
|
(add-to-list 'auto-mode-alist '("\\.pac\\'" . js2-mode))
|
||||||
(add-to-list 'interpreter-mode-alist '("node" . js2-mode))
|
(add-to-list 'interpreter-mode-alist '("node" . js2-mode))
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue