diff options
Diffstat (limited to 'lisp/js-mode-custom.el')
-rw-r--r-- | lisp/js-mode-custom.el | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/lisp/js-mode-custom.el b/lisp/js-mode-custom.el new file mode 100644 index 0000000..7f4d396 --- /dev/null +++ b/lisp/js-mode-custom.el @@ -0,0 +1,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) |