Function: cider-tree-view-toggle
cider-tree-view-toggle is an interactive and byte-compiled function
defined in cider-tree-view.el.
Signature
(cider-tree-view-toggle)
Documentation
Expand or collapse the node on the current line.
Expanding realizes the node's children on first use; a node that turns out to have none is demoted to a leaf rather than expanding into nothing.
Key Bindings
Source Code
;; Defined in ~/.emacs.d/elpa/cider-20260822.1520/cider-tree-view.el
(defun cider-tree-view-toggle ()
"Expand or collapse the node on the current line.
Expanding realizes the node's children on first use; a node that turns out to
have none is demoted to a leaf rather than expanding into nothing."
(interactive)
(let ((node (cider-tree-view-node-at-point)))
(cond
((null node) (user-error "No node here"))
((not (cider-tree-view-node-expandable-p node)) (user-error "Node is a leaf"))
((cider-tree-view-node-expanded node)
(setf (cider-tree-view-node-expanded node) nil))
(t
;; realize the children; an empty result leaves the node a leaf
(setf (cider-tree-view-node-expanded node)
(and (cider-tree-view--children node) t))))
(cider-tree-view--render)
(cider-tree-view--goto-node node)))