title: Automatically load clojure libraries on cider connection
body: <p>I constantly find myself doing multiple manual <code>(require '[my.lib :as foo])</code> right after I start cider with <code>M-x cider-jack-in</code> 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 <code>(use 'that.namespace)</code> but lazy as I am, I want to even skip that step if possible.</p>
  
  <p>UPDATE:</p>
  
  <p>Putting the forms in .lein/profiles.clj :injections is fine as long as one uses them exclusively in the Repl (as per <code>lein repl</code>). To make them available from the nrepl in emacs one must use the second solution named by arrdem below.</p>
  
  <p>Here is some <a href="http://thinkrelevance.com/blog/2013/06/04/clojure-workflow-reloaded" rel="nofollow">more comprehensive info</a>.</p>