summaryrefslogtreecommitdiff
path: root/lisp/js-mode-custom.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/js-mode-custom.el')
-rw-r--r--lisp/js-mode-custom.el37
1 files changed, 0 insertions, 37 deletions
diff --git a/lisp/js-mode-custom.el b/lisp/js-mode-custom.el
deleted file mode 100644
index 5c687f3..0000000
--- a/lisp/js-mode-custom.el
+++ /dev/null
@@ -1,37 +0,0 @@
-(defun setup-js()
- (setq js-indent-level 2)
- (hl-line-mode 1)
- (set-face-background hl-line-face "#EFEFEF")
- )
-
-(add-to-list 'auto-mode-alist '("\\.jsx$" . web-mode))
-(require 'js2-mode)
-(require 'js2-refactor)
-(require 'js2-highlight-vars)
-(require 'company)
-(require 'flycheck)
-(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-hook 'js2-mode-hook 'ac-js2-mode)
-(add-to-list 'company-backends 'ac-js2-company)
-
-(defun my/use-eslint-from-node-modules ()
- (let* ((root (locate-dominating-file
- (or (buffer-file-name) default-directory)
- "node_modules"))
- (eslint (and root
- (expand-file-name "node_modules/eslint/bin/eslint.js"
- root))))
- (when (and eslint (file-executable-p eslint))
- (setq-local flycheck-javascript-eslint-executable eslint))))
-(add-hook 'flycheck-mode-hook #'my/use-eslint-from-node-modules)
-(flycheck-add-mode 'javascript-eslint 'web-mode)
-
-
-(provide 'js-mode-custom)
-;; js-mode-custom.el ends here