File: cider-tree-view.el.html
A small tree view for result buffers that present a hierarchy of items the user can navigate, expand, and act on - think \"who calls this function\\", a call graph, or any flat list of jump-able results (a flat list is just a tree of depth one).
A node (see cider-tree-view-node) carries a display label, an optional
primary action (on-visit, bound to RET), and an optional children-fn that
yields its child nodes. Children are realized lazily: a node's children-fn
runs the first time it is expanded, so a deep graph can be explored a level at
a time without computing the whole thing up front.
The buffer keeps the node model and re-renders from it on every expand or collapse, rather than juggling overlays in place. That is a touch more work per toggle, but the trees here are small and the bookkeeping stays trivial.
Defined variables (7)
cider-tree-view--header-fn | When non-nil, a function of no arguments that inserts content above the tree. |
cider-tree-view--node-keymap | Keymap put on a node’s label so a click visits it. |
cider-tree-view--roots | The list of root ‘cider-tree-view-node’s rendered in this buffer. |
cider-tree-view-mode-abbrev-table | Abbrev table for ‘cider-tree-view-mode’. |
cider-tree-view-mode-hook | Hook run after entering cider-tree-view mode. |
cider-tree-view-mode-map | Keymap for ‘cider-tree-view-mode’. |
cider-tree-view-mode-syntax-table | Syntax table for ‘cider-tree-view-mode’. |