Function: cider--handle-enlighten
cider--handle-enlighten is a byte-compiled function defined in
cider-debug.el.
Signature
(cider--handle-enlighten RESPONSE)
Documentation
Handle an enlighten notification.
RESPONSE is a message received from the nrepl describing the value and coordinates of a sexp. Create an overlay after the specified sexp displaying its value.
Source Code
;; Defined in ~/.emacs.d/elpa/cider-20260414.1619/cider-debug.el
(defun cider--handle-enlighten (response)
"Handle an enlighten notification.
RESPONSE is a message received from the nrepl describing the value and
coordinates of a sexp. Create an overlay after the specified sexp
displaying its value."
(when-let* ((marker (cider--debug-find-source-position response)))
(with-current-buffer (marker-buffer marker)
(save-excursion
(goto-char marker)
(clojure-backward-logical-sexp 1)
(nrepl-dbind-response response (debug-value erase-previous)
(when erase-previous
(remove-overlays (point) marker 'category 'enlighten))
(when debug-value
(if (memq (char-before marker) '(?\) ?\] ?}))
;; Enlightening a sexp looks like a regular return value, except
;; for a different border.
(cider--make-result-overlay (cider-font-lock-as-clojure debug-value)
:where (cons marker marker)
:type 'enlighten
:prepend-face 'cider-enlightened-face)
;; Enlightening a symbol uses a more abbreviated format. The
;; result face is the same as a regular result, but we also color
;; the symbol with `cider-enlightened-local-face'.
(cider--make-result-overlay (cider-font-lock-as-clojure debug-value)
:format "%s"
:where (cons (point) marker)
:type 'enlighten
'face 'cider-enlightened-local-face))))))))