blob: 7f4d396f69afee5272813db80d16265251844bde (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
(defun setup-js()
(setq js-indent-level 2)
)
(require 'js2-mode)
(require 'js2-refactor)
(require 'js2-highlight-vars)
(require 'company)
;(add-hook 'js-mode-hook 'js2-minor-mode)
(add-to-list 'auto-mode-alist '("\\.js\\'" . js2-mode))
(add-hook 'js2-mode-hook #'js2-imenu-extras-mode)
(add-hook 'js2-mode-hook 'ac-js2-mode)
(add-hook 'js2-mode-hook 'js2-refactor-mode)
(add-hook 'js2-mode-hook 'js2-highlight-vars-mode)
(add-hook 'js2-mode-hook 'setup-js)
(js2r-add-keybindings-with-prefix "C-c C-r")
(add-to-list 'company-backends 'ac-js2-company)
(provide 'js-mode-custom)
|