Function: cider-completing-read-symbol

cider-completing-read-symbol is a byte-compiled function defined in cider-common.el.

Signature

(cider-completing-read-symbol PROMPT &optional DEFAULT)

Documentation

Read a Clojure symbol with PROMPT via completing-read.

DEFAULT, typically the symbol at point, is offered as the default value. Candidates come from the runtime through a dynamic collection, so this works with completing-read-based UIs (Vertico, Ivy, Helm, ...) without fetching every symbol up front, and it honors the user's completion styles and annotations.

Source Code

;; Defined in ~/.emacs.d/elpa/cider-20260822.1520/cider-common.el
(defun cider-completing-read-symbol (prompt &optional default)
  "Read a Clojure symbol with PROMPT via `completing-read'.
DEFAULT, typically the symbol at point, is offered as the default value.
Candidates come from the runtime through a dynamic collection, so this works
with `completing-read'-based UIs (Vertico, Ivy, Helm, ...) without fetching
every symbol up front, and it honors the user's completion styles and
annotations."
  (minibuffer-with-setup-hook
      (lambda ()
        (set-syntax-table clojure-mode-syntax-table)
        (setq-local eldoc-documentation-function #'cider-eldoc)
        (run-hooks 'eval-expression-minibuffer-setup-hook))
    (let ((input (completing-read
                  (if default
                      (format "%s (default %s): " prompt default)
                    (format "%s: " prompt))
                  (cider--symbol-completion-table)
                  nil nil nil 'cider-minibuffer-history default)))
      (if (string-empty-p input) (or default input) input))))