Function: cider--symbol-completion-table

cider--symbol-completion-table is a byte-compiled function defined in cider-completion.el.

Signature

(cider--symbol-completion-table)

Documentation

Return a completing-read collection backed by the complete op.

Candidates for the current input are fetched from the runtime lazily (so nothing is dumped up front), cached per input, and carry type/ns text properties so cider-annotate-symbol can annotate them. Querying only starts once the input reaches cider-completion-symbol-prompt-min-length characters, which keeps an empty prompt from asking for every symbol.

Source Code

;; Defined in ~/.emacs.d/elpa/cider-20260822.1520/cider-completion.el
(defun cider--symbol-completion-table ()
  "Return a `completing-read' collection backed by the `complete' op.
Candidates for the current input are fetched from the runtime lazily (so
nothing is dumped up front), cached per input, and carry `type'/`ns' text
properties so `cider-annotate-symbol' can annotate them.  Querying only
starts once the input reaches `cider-completion-symbol-prompt-min-length'
characters, which keeps an empty prompt from asking for every symbol."
  (let ((cache-key 'none) cache-val)
    (cider--completion-table
     (lambda (string)
       (unless (equal string cache-key)
         (setq cache-key string
               cache-val (when (>= (length string)
                                   cider-completion-symbol-prompt-min-length)
                           (cider-complete string))))
       cache-val)
     ;; `completing-read' has no capf plist, so the annotation/affixation
     ;; functions must ride along in the metadata.
     `((annotation-function . ,#'cider-annotate-symbol)
       (affixation-function . ,#'cider-affixate-symbol)))))