cider

A channel dedicated to the Clojure Interactive Development Environment that Rocks (aka CIDER). :cider:
jasmith 2021-02-20T00:16:17.000500Z

I am trying to get a clojurescript environment set up on a macos machine. I've been trying to get CIDER working. Highlighting works fine, but every time I try to jack-in I get the message could not start nREPL server: env: node: no such file or directory. And yes I do have node set up and on the emacs exec path. Any suggestions? Thanks!

teodorlu 2021-02-20T10:18:26.000900Z

CIDER doesn't know your setup in advance, so you might have to give it some help. This will depend on whether you're using Leiningen, deps.edn, shadow-cljs, or some combination. You might have to post more details to get good advice.

teodorlu 2021-02-20T10:19:22.001100Z

Also, Clojurescript REPLs are a bit more difficult to get started with than Clojure REPLs.

jasmith 2021-02-20T21:03:21.008800Z

shadow-cljs in this case. I was able to connect to the REPL from Cursive/IDEA (though I other problems with that setup), and had no trouble with VSCode + Calva.

jasmith 2021-02-20T21:05:55.009Z

1. Emacs installed with homebrew, and CIDER with the usual packages-install etc. 2. Shadow-cljs project that has been working fine from the command like / browser so far. Any other details I can provide? Thanks much!

teodorlu 2021-02-22T08:29:46.009600Z

Sounds like a good start :thumbsup: I'm no expert in this. But under the hood, CIDER/Calva/Cursive run a normal command that starts up the REPL. I'd start by finding out what that command actually is. You should probably be able to find that from the Calva / Shadow-CLJS docs, or you might get a straight answer in #calva 🙂

Casey 2021-02-20T14:03:19.004Z

I'd like to bind a key to run my mount (restart) function in my user ns but from any clj buffer (not just the active repl). Is this possible, how might I achieve that?

2021-02-20T14:11:49.005600Z

@ramblurr You can setup hooks in an .dir-locals.el Emacs project file. See the doc : https://docs.cider.mx/cider/0.26/usage/misc_features.html#reloading-code You can also find one of my example repo set up like that.

dpsutton 2021-02-20T14:12:25.007200Z

You can insert into repl (user/restart) and it would do what you need. Also that^

2021-02-20T14:12:59.007600Z

My repo use Integrant not Mount but you get the idea. 😉

2021-02-20T14:23:00.008600Z

After that you can use cider-ns-refresh keyboard shortcut. For me on Spacemacs: , e n r