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
modules
|
@ -35,9 +35,10 @@
|
|||
|
||||
(require 'js2-mode)
|
||||
|
||||
(add-to-list 'auto-mode-alist '("\\.js\\'" . js2-mode))
|
||||
(add-to-list 'auto-mode-alist '("\\.pac\\'" . js2-mode))
|
||||
(add-to-list 'interpreter-mode-alist '("node" . 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 'interpreter-mode-alist '("node" . js2-mode))
|
||||
|
||||
(with-eval-after-load 'js2-mode
|
||||
(defun prelude-js-mode-defaults ()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue