     (cljr-add-keybindings-with-prefix "C-c RET"))
 
   (add-hook 'clojure-mode-hook #'radian--enable-clj-refactor-mode)
+
+  ;; Because we disabled injection of the clj-refactor middleware
+  ;; earlier, we have to do it buffer-locally now (but only if we're
+  ;; in a project).
+
+  (defun radian--inject-cljr-dependencies (&rest args)
+    (when (cljr--project-dir)
+      (setq-local cljr-inject-dependencies-at-jack-in t)
+      (make-local-variable 'cider-jack-in-lein-plugins)
+      (make-local-variable 'cider-jack-in-nrepl-middlewares)
+      (cljr--inject-jack-in-dependencies)))
+
+  (advice-add #'cider-jack-in :before #'radian--inject-cljr-dependencies)
 
   :diminish clj-refactor-mode)
 

  :dependencies (clojure-mode cider yasnippet)
  :init

  ;; Enable clj-refactor in Clojure buffers. This is adapted from the
  ;; clj-refactor README [1].
  ;;

  ;; that refactor-nrepl is *not* enabled by default.
  (setq cider-lein-parameters "with-profile +awesome repl :headless")

  ;; The CIDER welcome message often obscures any error messages that
  ;; the above code is supposed to be making visible. So, we need to
  ;; turn off the welcome message.
