File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change 10
10
; ; Need to first remove from list if present, since elpa adds entries too, which
11
11
; ; may be in an arbitrary order
12
12
13
- (add-to-list 'auto-mode-alist '(" \\ .\\ (js\\ |es6\\ )\\ (\\ .erb\\ )?\\ '" . js2 -mode))
13
+ (add-to-list 'auto-mode-alist '(" \\ .\\ (js\\ |es6\\ )\\ (\\ .erb\\ )?\\ '" . js -mode))
14
14
15
15
; ; js2-mode
16
16
25
25
(defun sanityinc/enable-js2-checks-if-flycheck-inactive ()
26
26
(unless (flycheck-get-checker-for-buffer)
27
27
(setq-local js2-mode-show-parse-errors t )
28
- (setq-local js2-mode-show-strict-warnings t )))
28
+ (setq-local js2-mode-show-strict-warnings t )
29
+ (when (derived-mode-p 'js-mode )
30
+ (js2-minor-mode 1 ))))
31
+ (add-hook 'js-mode-hook 'sanityinc/enable-js2-checks-if-flycheck-inactive )
29
32
(add-hook 'js2-mode-hook 'sanityinc/enable-js2-checks-if-flycheck-inactive )
30
33
31
34
(add-hook 'js2-mode-hook (lambda () (setq mode-name " JS2" )))
You can’t perform that action at this time.
0 commit comments