Welcome! Please see the About page for a little more info on how this works.

0 votes
in Docs by

When using Cider, C-c C-d C-d shows the doc for a given functions. There should be a "See also" section at the bottom of the doc, listing related functions(e.g. "doseq" refers to "for"). However it's gone somehow. Did I accidentally turned it off or something? How do I get it back?

And by the way, where did that "related functions" information come from? It's not written in the doc string...

2 Answers

+1 vote
by
selected by
 
Best answer

Running M-x cider-version shows me that I'm running version 0.24.0. I have a fairly unmodified cider setup so C-c C-d C-d runs cider-doc. Executing this with the point on, say, doseq pops a buffer with the following contents:

clojure.core/doseq
[seq-exprs & body] 
Macro
Added in 1.0
  Repeatedly executes body (presumably for side-effects) with
  bindings and filtering as provided by "for".  Does not retain
  the head of the sequence. Returns nil.

clojure.core/doseq is defined in jar:file:<snipped>/.m2/repository/org/clojure/clojure/1.10.1/clojure-1.10.1.jar!/clojure/core.clj.

 Also see: doall dorun for dotimes run! 

[back]

So the good news is, you're not crazy!

I've dug into the implementation a bit and it appears the cider-doc function relies on functionality from cider/cider-nrepl, which in turn relies on functionality from cider/orchard, which in turn pulls the see-also information from ClojureDocs.

There's a lot of things that could have caused this to break, but the most likely scenario is that a CIDER developer accidentally broke something.

Check your version of cider as well as what version of cider/cider-nrepl and nrepl/nrepl is being used. If any of these are -SNAPSHOT versions, try moving back to a stable version to see if that fixes it. For reference, I'm using CIDER 0.24.0 with cider-jack-in, so it ends up pulling in cider/cider-nrepl 0.24.0 and nrepl/nrepl 0.6.0 on my machine.

There's lots of of helpful people on the #cider channel in Clojurians Slack who may be able to help you debug this if you're unable to get CIDER back to the desired state.

by
edited by
After some hacking with cider/orchard, here's what I found: netlify, where cider download info, is not stable in China, where I live. I probably corrupted the local cache sometime, and cider could not retrieve the info from ClojureDocs. My "fix" is downloading the info manually with a VPN and update the local cache.
0 votes
by

Try C-c C-d C-c it will show docs from clojuredocs.org.

I don't think Cider ever had "See also" in it's normal documentation, since like you said, that just uses the doc-string.

That said, it used to integrate with Grimoire, and maybe it was pulling related functions from there. That website is now gone though.

It now added support for clojuredocs.org docs instead, and those have a see also section which is user contributed.

...