I'm following the instructions here to create an uber-cool REPL.
Following those instructions, the ~/.lein/profiles.clj has an alias for Rebel-Readline and it's got all these other plugins and dependencies.
NOTE: I was confusing REBL with Rebel Readline. Those are two separate projects!!
However, it looks like when I execute lein rebl, I need to execute that after cd'ing into an actual project. Whereas lein repl can execute anywhere.
Also, if I do lein rebl, I don't seem to get an nREPL server and so cannot connect to it from my IDE. And there's no pprint or pst functions, whereas if I do plain old lein repl, these 2 functions are available.
I was under the impression that I could get everything with one command, the fancy Rebel Readline along with all these other goodies. But it seems like it's either-or.
Actually digging further, there looks like a way to do it:
which is using the clj command line.
Since I am using leiningen, I got this to work by having this in my profiles.clj
{:user{:dependencies [[com.bhauman/rebel-readline "0.1.4"] ;nice REPL[vlaaad/reveal "1.3.265"]]}}
OR alternatively with an empty ~/.lein/profiles.clj, from the command line:
lein update-in :dependencies conj "[vlaaad/reveal \"1.3.265\"]" "[com.bhauman/rebel-readline \"0.1.4\"]" -- repl
and then just invoking the below lines!
user=> (require 'rebel-readline.core) nil user=> (require 'rebel-readline.clojure.line-reader) nil user=> (require 'rebel-readline.clojure.service.local) nil user=> (require 'vlaaad.reveal) nil user=> (rebel-readline.core/with-readline-in (rebel-readline.clojure.line-reader/create (rebel-readline.clojure.service.local/create)) (vlaaad.reveal/repl :prompt (fn[]))) user=> ;; Rebel Readline starts with a Reveal window output
No comments:
Post a Comment