   (add-to-list 'company-backends 'company-elm))
 
 ;; JavaScript
-(when (require 'js2-mode nil t)
-  (add-hook 'js-mode-hook 'js2-minor-mode)
-  (add-hook 'js2-mode-hook 'ac-js2-mode))
-  ;; (add-hook 'js-mode-hook
-  ;;           (lambda () (flycheck-mode t)))
 (when (require 'flycheck nil t)
+  (add-hook 'js-mode-hook
+            (lambda () (flycheck-mode t)))
   ;; turn on flychecking globally
-  (add-hook 'after-init-hook #'global-flycheck-mode)
+  ;; (add-hook 'after-init-hook #'global-flycheck-mode)
   ;; disable jshint since we prefer eslint checking
   (setq-default flycheck-disabled-checkers
                 (append flycheck-disabled-checkers

          helm-gtags
          helm-projectile
          hindent
          js2-mode
          json-mode
          magit
          merlin

        (let ((web-mode-enable-part-face nil))
          ad-do-it)
      ad-do-it)))
(when (require 'web-beautify nil t)
  (eval-after-load 'js2-mode
    '(define-key js2-mode-map (kbd "C-c b") 'web-beautify-js))
  ;; Or if you're using 'js-mode' (a.k.a 'javascript-mode')
  (eval-after-load 'js
    '(define-key js-mode-map (kbd "C-c b") 'web-beautify-js))
  (eval-after-load 'json-mode
    '(define-key json-mode-map (kbd "C-c b") 'web-beautify-js))
  (eval-after-load 'sgml-mode
    '(define-key html-mode-map (kbd "C-c b") 'web-beautify-html))
  (eval-after-load 'web-mode
    '(define-key web-mode-map (kbd "C-c b") 'web-beautify-html))
  (eval-after-load 'css-mode
    '(define-key css-mode-map (kbd "C-c b") 'web-beautify-css)))
