Fork me on GitHub

is there some way in cider to list all of the places a function is used?


looks like has this but I know that’s outside cider ..


Can’t get it to work on my end - at any rate, this feature would be so unbelievably useful, I’m curious why it’s not present tbh


Would love to see unrepl support in Cider, I wouldn't mind my Clojurist Together money to go help make that happen.


@iwannaseethelight You can do that with cljr-find-usages. CIDER should auto inject refactor-nrepl which is the middleware used by clj-refactor. So it should work with Cider. Just do Cider jack in, and then put the point over a symbol, and run cljr-find-usages.


It does require your project to compile properly, otherwise the analysis fails


yeah trying to get that working, i just get a massive exception


Its definitely a bit wonky, all the clj-refactor refactorings are


is clj-refactor supposed to complement cider?


@iwannaseethelight I think it can be used independently. You could install just that, and add the nRepl middleware in your project's dependencies manually.


But Cider just makes it nicer by injecting the middleware, and maybe it bundles clj-refactor with it, I'm not sure, since I use spacemacs, I might have gotten it seperatly from the clojure layer


@didibus That’s not true. clj-refactor is a CIDER extension, you can’t use it without CIDER. 🙂 It adds additional middleware and Emacs commands, but also relies on the presence of the core CIDER functionality.


> is clj-refactor supposed to complement cider?


@iwannaseethelight basically yes. I also consider it a testbed for experimental features that might potentially be pulled upstream into CIDER itself.


> Would love to see unrepl support in Cider, I wouldn’t mind my Clojurist Together money to go help make that happen.


@didibus That’s in our plans, but it requires a bit of work and time to do that work. I hope we’ll get there at some point this year, but we also plan to make some good improvements to nREPL in the mean time.


Exciting times ahead! 🙂


Btw, while I’m as excited about unrepl (and new ideas in general) as everyone else, I don’t think that simply adopting it will make some huge difference for end users right away. ClojureScript support would be easier, and we’d get things like elided collections and sideloading, but someone also has to port all the existing functionality to the new API and there’s also the problem that parseclj is still young and rough around the edges, etc.


I think in the end of the day the most important thing is the end user experience, and not the underlying implementation. After all - first and foremost we want to get things done. 🙂 That’s why for me it’s important to keep improving what we have and its foundations, while also working towards supporting additional REPLs.


And, btw, there’s also the point that a lot of big gains can be made from improving nREPL itself - e.g. adding something like elided collections functionality should not be very hard, and with relatively small piggieback improvements you can mostly eliminate the need for having two REPL connections per project.


I updated my my earlier issue and submitted a bug report here:


It looks like cider-nrepl has namespace renaming turned off for the tools.nrepl dependency only.


This can sometimes cause issues for projects that have the cider-nrepl dependency.


I can confirm that turning namespace renaming back on solves my issue, but likely breaks debugging middleware that depends on namespace renaming being turned off.


Should I resubmit this bug in cider-nrepl?


> It looks like cider-nrepl has namespace renaming turned off for the tools.nrepl dependency only.


The problem is that that’s a namespace you can’t alias, otherwise the middleware won’t work. 🙂


> I can confirm that turning namespace renaming back on solves my issue, but likely breaks debugging middleware that depends on namespace renaming being turned off.


Is something even working when you rename the nREPL namespaces?


I’ll take a look at the ticket, but because almost always cider-nrepl depends on the latest nREPL and so do projects, conflicts between the two are very uncommon.


Yeah, I don't actually need cider-nrepl it was just sitting in my .profiles.clj for some historical reason.


But just having it there broke my compilation in cider.


sorry I mean tools.nrepl


I think I just like solving a juicy mystery 😉!

Michael Fiano17:03:04

Is it strange that cider-jack-in from a clojure project buffer only connects to a REPL, but does not show the REPL buffer? I have to manually switch to the buffer it creates, or call cider-switch-to-repl-buffer to use the REPL.


@mfiano I haven’t seen that . What version of cider by the way?

Michael Fiano18:03:19

@mikerod ;; CIDER 0.17.0snapshot (package: 20180312.26), nREPL 0.2.13

Michael Fiano18:03:29

@seancorfield Thanks! That was what I needed


Existing Cider/Lein user here; Has anyone successfully used a fresh emacs/inf-clojure setup with Lumo (no lein or boot installed) and connected to a repl? I'm currently unable to do so following the instructions on inf-clojure's README After adding ((nil . ((inf-clojure-boot-cmd . "lumo -d")))) in .dir-locals.el of my emacs,d setup, running M-X inf-clojure still complains about not finding lein on path. Suggestions?

Garrett Hopper19:03:58

How can I manage what connection a particular buffer is using? I have a setup with 3 repls (1 clj, 2 cljs). Do I just need to set cider-request-dispatch to static and start managing the default connection myself?


Hi @magnars, always exciting to see you around, you are an Emacs legend. 🙂


Is there an example in the cider-nrepl middleware that enriches or modifies other messages? What I mean is, not an “op” you invoke directly but rather something that watches for values being returned by other evaluations and transforms them? I looked at pprint, but that’s not quite the pattern I mean. I don’t think I need to pass anything in, just want to “filter” on the way out.


… looking at


Hey guys, I’m sure I’m missing something trivial, but instrumenting an entire defn works fine, but I can’t seem to get #break / #dbg to work, any leads?


Oh interesting, it works if I reevaluate the method via cider-eval-defun-at-point, but if I reload the buffer via cider-load-buffer it does not. Perhaps cider-load-buffer does not do what I think it does.


I was under the impression that it reevaluated every function in the buffer, no?


Perhaps I’m missing something here, I guess if I modify a function I have to instrument it for it to be debuggable, that it?


I’m also curious if I have to manually instrument every function I want to step into.


You can step into other functions once you’re in the debugger.


Hey @U4PUTN69G - when I instrument a function and the debugger breaks in it, I can’t seem to step into functions inside of that function. Do I have to instrument any function I wish to step into ahead of time?


That sounds wrong. Let me go get my laptop


No, you can definitely step into functions that aren’t instrumented including library functions you didn’t write.


I typically instrument functions with C-u C-M-x as described here ( If there’s any doubt what is instrumented and what isn’t, you can M-x cider-browse-instrumented-defs which is also documented if you follow the link.