   :files ("package.json" "app/index.html" "app/main.js")
   :in (web-mode js2-mode markdown-mode json-mode coffee-mode))
 
-(use-package tern
-  :commands tern-mode
-  :init (add-hook! js2-mode 'tern-mode)
-  :config
-  (require 'company-tern)
-  (define-company-backend! js2-mode (tern)))
-
 (use-package unityjs-mode
   :mode "/Assets/.*\\.js$"
-  :config
-  (add-hook! unityjs-mode 'flycheck-mode))
+  :config (add-hook 'unityjs-mode-hook 'flycheck-mode))
 
 (use-package coffee-mode
   :mode "\\.coffee$"
-  :config
-  (setq-default coffee-indent-like-python-mode t))
+  :config (setq-default coffee-indent-like-python-mode t))
 
 (provide 'module-js)
 ;;; module-js.el ends here

  :mode "\\.js$"
  :interpreter "node"
  :init
  (use-package nodejs-repl :defer t :commands (nodejs-repl)
    :config (evil-set-initial-state 'nodejs-repl-mode 'emacs))

  (define-repl! js2-mode nodejs-repl)

            (log-this                   "log this"                   'both)
            (debug-this                 "debug this"                 'both)
            (forward-slurp              "forward slurp"              nil)
            (forward-barf               "forward barf"               nil)))))

(define-minor-mode nodejs-mode
  :lighter " node" :keymap (make-sparse-keymap)
