Fork me on GitHub
#cider
<
2021-02-20
>
jasmith00:02:17

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!

teodorlu10:02:26

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.

teodorlu10:02:22

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

jasmith21:02:21

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.

jasmith21:02:55

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!

teodorlu08:02:46

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 šŸ™‚

Casey14:02:19

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?

Michaƫl Salihi14:02:49

@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.

dpsutton14:02:25

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

Michaƫl Salihi14:02:59

My repo use Integrant not Mount but you get the idea. šŸ˜‰

Michaƫl Salihi14:02:00

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