Fork me on GitHub
#cursive
<
2020-04-19
>
Oliver George05:04:23

I'm trying out Krell and trying to get a good REPL setup.

Oliver George05:04:17

Here's my REPL config...

Oliver George05:04:52

The problem I have is it starts in "CLJ mode" which means symbols don't resolve and I can't load code from the editor. I can switch over using the dropdown - then it works fine.

Oliver George05:04:33

Is that something Krell can fix - some kind of handshake which might be missing as the REPL boots?

cfleming21:04:03

Yes, Cursive switches between REPL types by scanning for particular output lines. That should be configurable, but isn’t at the moment. The current check looks like:

(or (.contains ^String line "Type `:cljs/quit` to stop the ClojureScript REPL")
    (.contains ^String line "To quit, type: :cljs/quit")
    (re-matches #"ClojureScript [0-9\.]+" line))

🙂 4
cfleming21:04:16

I’ll look at making that configurable for the next release.

dnolen21:04:21

Wouldn't it be possible to just check the prompt?

dnolen21:04:43

cljs.user ?

dnolen21:04:13

hrm, though I see that you're probably detecting Clojure by looking for the version string ...

dnolen21:04:46

and that avoids issues w/ starting in a different ns as well

dnolen21:04:50

ok can do that

cfleming23:04:38

Thanks - although once that’s configurable it should be easier to make work with anything.

Oliver George05:04:53

Or is it something Cursive can handle

Oliver George05:04:57

Here's what it looks like when I boot up...