 (use-package rjsx-mode
   :mode ("\\.js[x]?\\'")
   :config
-  (js2r-add-keybindings-with-prefix "C-c C-m")
-
-  (use-package xref-js2
-    :config
-    (add-hook 'js2-mode-hook
-              #'(lambda ()
+
+  (add-hook 'js2-mode-hook
+            #'(lambda ()
+                (use-package xref-js2
+                  :config
                   (unbind-key "M-." js2-mode-map)
-                  (add-hook 'xref-backend-functions #'xref-js2-xref-backend nil t))))
-
-  (add-hook 'js-mode-hook
-            #'(lambda () (js2-imenu-extras-mode 1)))
+                  (add-hook 'xref-backend-functions #'xref-js2-xref-backend nil t))
+
+                (js2-refactor-mode 1)
+                (js2r-add-keybindings-with-prefix "C-c r")))
 
   (add-hook 'js-mode-hook
             #'(lambda ()

  (bind-keys ("M-%"     . vr/replace)
             ("C-M-%"   . vr/query-replace)
             ("C-c C-s" . vr/isearch-forward)
             ("C-c C-r" . vr/isearch-backward)
             ("C-c m"   . vr/mc-mark)))

;; Turn on subword mode for all prog modes

  (if (and (not (use-region-p)))
      (comment-or-uncomment-region (line-beginning-position) (line-end-position))
    (comment-dwim arg)))

;; WTF still using ASCII inputs???
(define-key input-decode-map [?\C-m] [C-m])

(eval-when-compile
  (require 'use-package))
