clojure-emacs / cider-nrepl

A collection of nREPL middleware to enhance Clojure editors with common functionality like definition lookup, code completion, etc.
https://docs.cider.mx/cider-nrepl
673 stars 175 forks source link

Implement `cider-doc` for keywords #818

Closed vemv closed 11 months ago

vemv commented 11 months ago

Context

Compliment and Corfu can reach for cider-doc for describing a candidate.

When that candidate is a keyword, nothing is shown (because cider-doc isn't implemented for keywords), which depending on the Compliment setup, can result in this ugly buffer being shown:

image

Task

Implement, for now, a bare-bones code path for cider-doc such that we'll at least show the 'arities' that all keywords share ([map], [map not-found]).

If it's at hand, we can also show the spec, if found.

We can leave as a TODO showing the xrefs.

vemv commented 11 months ago

This isn't as important, following come Company commits (which will no longer show useless doc buffer)

(also, I had meant to open this under https://github.com/clojure-emacs/cider/issues - not cider-nrepl)