I started using Clojure with leiningen
(and now boot
).
Now I sometimes want to get quickly to a Clojure{Script} CIDER REPL in Emacs to execute just a few instructions. I don't want to create a project.clj
file for that, since I just want a throwaway REPL.
Is there a way to get a Clojure REPL, for instance in the *scratch*
buffer ?
To start a REPL session in Eclipse, click the Menu option, go to Run As → Clojure Application. This will start a new REPL session in a separate window along with the console output.
There is no way to stop execution. On those versions CTRL-C will lead to termination of the whole scala REPL.
A Clojure REPL (standing for Read-Eval-Print Loop) is a programming environment which enables the programmer to interact with a running Clojure program and modify it, by evaluating one code expression at a time.
Using the CLI tools You can exit the REPL by typing Ctrl+D (pressing the Ctrl and D keys at the same time).
well, you can execute M-x cider-jack-in anywhere you want, even with no project.clj in path. This works for me.
You can just type lein repl
in the friendly console / shell / terminal right next to you -- no project.clj
required. This will start a REPL as expected, to which you can then connect from Emacs via M-x cider-connect
(which in recent versions will handily suggest host and port to connect to).
M-x cider-jack-in
basically does the same thing (i.e. lein repl
) behind the scenes.
I'm not a boot user, but according to the boot wiki for leiningen users it should be possible to call boot repl -s
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With