   :dependencies (clojure-mode cider yasnippet)
   :init
 
+  ;; By default, clj-refactor enables the refactor-nrepl middleware in
+  ;; an *autoload*, meaning that it's already happened as soon as
+  ;; clj-refactor has loaded. But refactor-nrepl doesn't work outside
+  ;; a Clojure project, and signals a warning in that case. So we need
+  ;; to *selectively* inject refactor-nrepl, which means we need to
+  ;; disable it right away so we can do it buffer-locally later. See
+  ;; [1] for discussion of the problem.
+  ;;
+  ;; [1]: https://github.com/clojure-emacs/refactor-nrepl/issues/177
+  (setq cljr-inject-dependencies-at-jack-in nil)
+
   ;; Enable clj-refactor in Clojure buffers. This is adapted from the
   ;; clj-refactor README [1].
   ;;

    (cljr-add-keybindings-with-prefix "C-c RET"))

  (add-hook 'clojure-mode-hook #'radian--enable-clj-refactor-mode)

  :diminish clj-refactor-mode)


  ;; 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.
