I constantly find myself doing multiple manual (require '[my.lib :as foo])
right after I start cider with M-x cider-jack-in
in my clojure projects. I suspect there must be a hook to run some code on a successful connection. Is there? The alternative would be to put all requires in an external file and just (use 'that.namespace)
but lazy as I am, I want to even skip that step if possible.
UPDATE:
Putting the forms in .lein/profiles.clj :injections is fine as long as one uses them exclusively in the Repl (as per lein repl
). To make them available from the nrepl in emacs one must use the second solution named by arrdem below.
Here is some more comprehensive info.