Fork me on GitHub
Shantanu Kumar14:07:56

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


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


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?


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


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


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


ok. is it a clojure repl?


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