Fork me on GitHub
#cider
<
2021-08-06
>
j0ni10:08:27

Is it possible to fully unload cider after a buffer has loaded, such that inf-clojure will work without collisions? Or is it best to just find a way to avoid loading cider in the first place, in the clj files for which you want to use inf-clojure?

dpsutton13:08:57

I’ve got something for this. Let me find it

dpsutton13:08:10

i can't find the snippet any longer. It was largely (remove-hook 'clojure-mode-hook #'cider-mode) to prevent buffers from pulling up cider, and then you can loop over the buffers in the buffer list and when they have cider mode active remove cider

Jakub Šťastný11:08:17

That's a good question, I'd also like to know the answer (in my case, I'm interested in running socket REPL in some scenarios, for instance so I can have nested sessions to be used essentially as a debugger (and yes, I know cider has got an actual debugger, I just prefer this).

william11:08:52

hey, where's the variable that holds the default command for cider-jack-in?

djm12:08:27

There isn’t a single one. But if it’s a lein project, it’ll use cider-lein-command, cider-lein-parameters, cider-lein-global-options, cider-jack-in-dependencies, cider-jack-in-lein-plugins, and probably some others

djm12:08:17

Does that help?

william13:08:46

thanks @U015KH5ENEM, it's not a lein project, I'm trying a projectless workflow, and my repl is invoked via the clojure cli tools. The one I usually have (and can edit via the universal argument) is:

/run/current-system/sw/bin/clojure -Sdeps '{:deps {nrepl/nrepl {:mvn/version "0.8.3"} refactor-nrepl/refactor-nrepl {:mvn/version "2.5.1"} cider/cider-nrepl {:mvn/version "0.25.9"}} :aliases {:cider/nrepl {:main-opts ["-m" "nrepl.cmdline" "--middleware" "[cider.nrepl/cider-middleware]"]}}}' -M:cider/nrepl
but I want to add a couple more flags automatically

william13:08:19

I can find 3 setting mentioning clojure cli: cider-clojure-cli-global-options -> nil cider-clojure-cli-command -> clojure cider-clojure-cli-aliases -> nil So I'm unsure where the big command is

djm13:08:45

Some of the ones I mentioned aren’t lein-specific

djm13:08:06

Oh, maybe just one of them: cider-jack-in-dependencies

djm13:08:08

It looks like cider-jack-in-lein-plugins is used for cli too

william13:08:54

in the end I was able to get what I wanted via cider-clojure-cli-global-options! Thanks @U015KH5ENEM 🎉

djm13:08:15

Great! No problem