<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
  <title>Vedang.me, posts tagged cider</title>
  <link href="https://vedang.me/feeds/cider.xml" rel="self"/>
  <link href="https://vedang.me/"/>
  <updated>2026-07-07T19:12:27+00:00</updated>
  <id>https://vedang.me/</id>
  <author>
    <name>Vedang Manerikar</name>
  </author>
  <entry>
    <id>https://vedang.me/clj-rebl-lein-cider-emacs/</id>
    <link href="https://vedang.me/clj-rebl-lein-cider-emacs/"/>
    <title>How to use the Clojure REBL with Leiningen, Cider and Emacs</title>
    <updated>2020-10-28T00:00:00+00:00</updated>
    <content type="html"><![CDATA[<p>Note&#42;: This set of instructions only work on <strong>Clojure 1.10+</strong>, <strong>Lein 2.9+</strong> and <strong>JDK 11+</strong>. Also, REBL requires a license for commercial use.</p><p>I didn't find a handy reference to getting started with REBL if your primary workflow is Leiningen/nrepl, so here is the series of things I had to do to get the REBL up and running for myself.</p><ol><li>Download the <a href='https://docs.datomic.com/cloud/other-tools/REBL.html'>REBL jar</a> from Cognitect.</li><li>Use <a href='https://github.com/kumarshantanu/lein-localrepo'>lein-localrepo</a> to install the REBL jar to your m2.<pre><code class="language-shell-script">    lein localrepo install rebl-0.9.242/rebl-0.9.242.jar com.cognitect/rebl 0.9.242
    </code></pre></li><li>Add the following code to your <code>profiles.clj</code> file (code below). This is based on the <a href='https://docs.datomic.com/cloud/other-tools/REBL.html#installation'>REBL installation guide</a> and <a href='https://github.com/RickMoynihan/nrebl.middleware'>Rick Moynihan's nrepl middleware</a>:<pre><code class="language-clojure">    {
     ;; ....
     ;; You other profiles stuff
     ;; ....
     :rebl {:plugins &#91;&#91;cider/cider-nrepl &quot;0.25.3&quot;&#93;
                      &#91;refactor-nrepl &quot;2.5.0&quot;&#93;
                      &#91;nrepl &quot;0.8.2&quot;&#93;&#93;
            :repl-options {:nrepl-middleware &#91;nrebl.middleware/wrap-nrebl&#93;}
            :dependencies &#91;&#91;org.clojure/tools.deps.alpha &quot;0.7.511&quot;&#93;
                           &#91;com.cognitect/rebl &quot;0.9.242&quot;&#93;
                           &#91;org.clojure/core.async &quot;1.3.610&quot;&#93;
                           &#91;cljfmt  &quot;0.6.4&quot;&#93;
                           &#91;rickmoynihan/nrebl.middleware &quot;0.3.1&quot;&#93;
                           &#91;org.openjfx/javafx-fxml &quot;15-ea+6&quot;&#93;
                           &#91;org.openjfx/javafx-controls &quot;15-ea+6&quot;&#93;
                           &#91;org.openjfx/javafx-swing &quot;15-ea+6&quot;&#93;
                           &#91;org.openjfx/javafx-base &quot;15-ea+6&quot;&#93;
                           &#91;org.openjfx/javafx-web &quot;15-ea+6&quot;&#93;&#93;}
     ;; ....
     ;; If you don't have anything in your profiles.clj right now, just
     ;; remove the comments and copy the whole map over.
     }
    </code></pre></li><li>Start the REPL with the new profile<pre><code class="language-shell-script">    lein with-profile +rebl repl :headless
    </code></pre></li><li>Connect to the REPL from Emacs. Do this by opening up any Clojure file in your project and executing <code>M-x cider-connect</code> in the file.</li><li>Run the following commands in the REPL to spin up the REBL.<pre><code class="language-clojure">    &#40;require '&#91;cognitect.rebl :as rebl&#93;&#41;
    &#40;rebl/ui&#41;
    </code></pre></li><li>At this point, anything that you evaluate when programming will be sent to your REPL as well as to your REBL and can be inspected from there. Anything you evaluate into the REPL will be sent over to the REBL as well.</li><li>Work on the REPL as you normally would. Your work is also being sent into the REBL for fancy viewing when you need it.</li></ol>]]></content>
  </entry>
</feed>
