Function: cider--completion-table

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

Signature

(cider--completion-table CANDIDATES-FN &optional METADATA-EXTRA)

Documentation

Return a programmed-completion table over CANDIDATES-FN.

CANDIDATES-FN is called with the current completion string and returns the candidate list, each candidate carrying type/ns text properties; it owns its own caching. METADATA-EXTRA is spliced into the metadata response - use it for completing-read tables, which (unlike a capf, whose plist carries them) must announce their annotation-function/affixation-function through metadata. See Info node (elisp) Programmed Completion.

Source Code

;; Defined in ~/.emacs.d/elpa/cider-20260822.1520/cider-completion.el
(defun cider--completion-table (candidates-fn &optional metadata-extra)
  "Return a programmed-completion table over CANDIDATES-FN.
CANDIDATES-FN is called with the current completion string and returns the
candidate list, each candidate carrying `type'/`ns' text properties; it owns
its own caching.  METADATA-EXTRA is spliced into the `metadata' response - use
it for `completing-read' tables, which (unlike a capf, whose plist carries
them) must announce their `annotation-function'/`affixation-function' through
metadata.  See Info node `(elisp) Programmed Completion'."
  (lambda (string pred action)
    (cond
     ((eq action 'metadata)
      `(metadata
        (category . cider) ;; our completion category, keyed on by `completion-category-overrides'
        (display-sort-function . identity) ;; keep the backend's ranking
        ,@metadata-extra))
     ((eq (car-safe action) 'boundaries) nil)
     (t (complete-with-action action (funcall candidates-fn string) string pred)))))