Fork me on GitHub
#emacs
<
2023-02-15
>
Dimitar Uzunov08:02:39

what do you guys use to start your clojure + repl processes if you use a wrapper? I.e. if you use bb nrepl-server. I’ve been trying to run it in shell-mode

practicalli-johnny10:02:47

I run https://practical.li/clojure/clojure-cli/repl/, typically using rebel and a few other tools and then use cider connect. For most projects I now use a Makefile so I can always do make repl regardless of what tool and configuration the project is set up with. I haven't considered babashka for running a repl as Clojure CLI (and previously Leiningen) has been simpler to work with, although would be interested to understand how to do this and what are the benefits & constraints

Dimitar Uzunov10:02:24

I’m also currently using various tools in a separate terminal, but I’m trying to ultimately run all commands from emacs

Dimitar Uzunov10:02:39

I now run make from projectile, it is quite convenient 🙂

Dimitar Uzunov10:02:48

hmmm I could try to add my custom project type to cider

practicalli-johnny11:02:00

The cider-jack-in command is relatively configurable using a .dir-locals.el configuration,which can also include some elisp code, althoughI assume there are some limits https://practical.li/spacemacs/clojure-development/project-configuration/

Dimitar Uzunov11:02:50

thanks, that looks like what I need!

practicalli-johnny12:02:34

cider-jack-in-clj works with Babashka projects that are using bb.edn according to the cider docs, otherwise it seems babashka should be started with an nrepl server on the command line https://docs.cider.mx/cider/platforms/babashka.html

Dimitar Uzunov12:02:10

I use a lot of repls running remotely over a tunnel

Dimitar Uzunov12:02:28

and I have bb wrappers that allow me to start those tunnels

Dimitar Uzunov12:02:01

so basically need to run a command + provide a host + port to cider-connect

Dimitar Uzunov12:02:37

I think I have fugured out how using nrepl-start-server-process + cider-nrepl-connect