Morning
Good Morning!
morngn
mawning
mogge
morning
Happy rainy Friday 🙂
:umbrella_with_rain_drops:
Morning 🙂
Morn'
Does anyone use leiningen with rebel-readline and have a nrepl server running?
it's a fancy terminal for interactive input that does things like tab completion, colourised output, highlighting, history,
command history, multi-line editing, syntax colouring etc..
I use it with deps, but not with leiningen
oh, nice - that sounds like i would use that - particularly multi-line editing
Practicalli did a small video on it a while agao <https://www.youtube.com/watch?v=U19TWMsg0s0>
i've often got a terminal repl running alongside a CIDER session, 'cos i don't find multiple concurrent CIDER sessions that great an experience
I too have it running, but I'm working on a project that uses lein, so just seeing if anyone had it running. It does work, but it prevents nrepl from starting (not because of a bug or whatnot, but simply it doesn't understand how to)
with clojure deps, it's dead simp
did you figure it out @dharrigan? i'm repling on a server atm, and it would actually be really handy to have multi-line editing
I've decided to take the approach of maintaining my own deps.edn
and migrating the project.clj
to that 🙂 (keeping the existing lein configuration)
So, you could said I abandoned the attempt to get it to work with lein, instead, I'm using my proven way of deps.edn
oh well 😢 . i'd like to switch to deps.edn, but it's going to be so painful
@dharrigan I have all of that running on most of my projects, I don't believe it cases any conflicts...
?
https://clojurians.slack.com/archives/C064BA6G2/p1624009580324200
Is there an issue you're seeing 😃?
I prerhaps didn't explain myself well...
if you have this:
❯ cat profiles.clj
{:user {:dependencies [[com.bhauman/rebel-readline "0.1.4"]]
:plugins [[cider/cider-nrepl "0.26.0"]]
:aliases {"rebel" ["trampoline" "run" "-m" "rebel-readline.main"]}}}
in your profiles.clj for lein, and you do this lein rebel
, no nrepl
server is started
where as, if you simply do lein repl
then it is
I don't use lein that much (mostly been a deps guy from day one)
so I don't know how it is possible to start up rebel and the nrepl server too
Hmm, they coexist nicely in the same project. It's just normally I use rebel for the command line and nrepl for connecting to cursive. I do start up sessions with lein repl. Practicalli seems to be able to do it:
For a rich terminal REPL experience, start the REPL with rebel readline as well as nREPL and CIDER libraries.
clojure -M:repl/rebel-nrepl
From here: <https://practical.li/spacemacs/clojure-repl/connect-to-remote-repl.html>
right, so that's a project.clj and a deps.edn being used
I think it would be possible to do, for I do something similar with deps..
As part of my "boot" of clj, I have this
(defn start-nrepl
[env-port]
(let [server-map (nrepl/start-server
:port (or env-port 0)
:handler (apply nrepl.server/default-handler
(-> (map #'cider.nrepl/resolve-or-fail cider.nrepl/cider-middleware)
(conj #'refactor-nrepl.middleware/wrap-refactor))))
port (:port server-map)
port-file (io/file ".nrepl-port")]
(.deleteOnExit port-file)
(spit port-file port)
(println (ansi/green (str "nREPL client can be connected to port " port)))))
so I programmatically start the nrepl server
I guess I can do the same in a user.clj
on the lein project
but <shrug>, might as well just convert the project.clj to deps.edn (which I've done as a POC) and it works grand