Liking cljdoc? Tell your friends :D

nREPL

If you would like to send every REPL eval to Portal, you can use the portal.nrepl/wrap-portal nrepl middleware.

NOTE: Portal will keep all evaluated objects from being garbage collected until they are cleared from the UI. However, the nREPL middleware will only submit values to Portal when the UI is open.

tools.deps

If you are starting nrepl from tools.deps, you can try the following:

;; deps.edn
{:aliases
 {:nrepl
  {:extra-deps {cider/cider-nrepl {:mvn/version "0.28.5"}}
   :main-opts ["-m" "nrepl.cmdline"
               "--middleware"
               "[cider.nrepl/cider-middleware,portal.nrepl/wrap-portal]"]}}}

shadow-cljs

If you are using shadow-cljs, you can add the middleware via the shadow-cljs.edn file:

;; shadow-cljs.edn
{:nrepl {:middleware [portal.nrepl/wrap-portal]}}

Can you improve this documentation?Edit on GitHub

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close