Fork me on GitHub
#inf-clojure
<
2021-07-14
>
Shantanu Kumar14:07:56

Hi, can anybody tell me the shortcut for set-ns (equiv to (in-ns ..)) in inf-clojure?

dpsutton14:07:29

if your cursor is in a file, you can C-c M-r to require that namespace and then C-c M-n to put the repl in that namespace

dpsutton14:07:35

the former is inf-clojure-reload and the latter is inf-clojure-set-ns

Shantanu Kumar14:07:44

@dpsutton Thanks! I was looking at the help page (C-h f inf-clojure-mode) but it doesn't list these things. Where can I find a list of key bindings?

dpsutton14:07:56

i was gonna point you at the readme but its not there.

Shantanu Kumar14:07:36

BTW, when I press C-c M-n It says set-ns not configured for socket (I entered REPL type socket) during inf-clojure-connect

dpsutton14:07:52

oh yeah, that's not a valid repl type. What kind of repl are you connecting to?

dpsutton14:07:05

it only needs to know for how to query the repl. ie clojure.repl/doc, etc. babashka, lumo, planck, cljs, and clojure all have different ways to do some things. so it's important to set what type you are using, not that its a socket repl. You can evaluate (setq inf-clojure-repl-type 'clojure) in the repl buffer to fix it

Shantanu Kumar14:07:13

I started Socket-REPL using Leiningen by specifying :jvm-opts

dpsutton14:07:21

ok. is it a clojure repl?

dpsutton14:07:42

cool. all inf-clojure cares about is that it's a clojure repl. so run (setq inf-clojure-repl-type 'clojure) in the repl buffer

Shantanu Kumar14:07:13

OK, so just evaluating (setq ..) didn't work, but I disconnected inf-clojure and connected again with Socket-type: clojure then C-c M-n worked. Thanks again!

👍 2