Function: cider-docview-clojuredocs-examples

cider-docview-clojuredocs-examples is an interactive and byte-compiled function defined in cider-doc.el.

Signature

(cider-docview-clojuredocs-examples)

Documentation

Toggle the display of ClojureDocs examples for the current symbol.

The examples are fetched on first use (and cached), then shown beneath the documentation; invoking this again hides them. The footer's button toggles them too.

Key Bindings

Source Code

;; Defined in ~/.emacs.d/elpa/cider-20260822.1520/cider-doc.el
(defun cider-docview-clojuredocs-examples ()
  "Toggle the display of ClojureDocs examples for the current symbol.
The examples are fetched on first use (and cached), then shown beneath the
documentation; invoking this again hides them.  The footer's button toggles
them too."
  (interactive)
  (unless cider-docview-symbol
    (user-error "No symbol associated with this buffer"))
  (cond
   ;; currently expanded -> collapse
   (cider-docview--clojuredocs-shown
    (setq-local cider-docview--clojuredocs-shown nil)
    (cider-docview--refresh-clojuredocs-footer))
   ;; already fetched -> just expand (or report there's nothing to show)
   (cider-docview--clojuredocs-data
    (if (nrepl-dict-get cider-docview--clojuredocs-data "examples")
        (progn
          (setq-local cider-docview--clojuredocs-shown t)
          (cider-docview--refresh-clojuredocs-footer))
      (message "No ClojureDocs examples for %s" cider-docview-symbol)))
   ;; not fetched yet -> fetch, then show
   (t
    (cider-docview--fetch-clojuredocs-examples))))