Skip to main content

listing_inlays

Function listing_inlays 

Source
pub fn listing_inlays(
    entries: &[ListingEntry],
    reg: &dyn ThemeRegistry,
    nerd_fonts: bool,
) -> Vec<InlayRow>
Expand description

Build one leading inlay per listing row: the glyph [lattice_core::ui::icons::glyph_for_entry] picks, painted with the element listing_element_for resolves.

A pure function of the entries plus the theme’s interned ids, so it is testable without a buffer, an editor, or a frame — the producer side of DL.3b is just “call this and publish the result”.

Each icon anchors at its entry’s icon_byte — 0 for oil’s flat rows, after the indent and expand marker for the tree. Keeping the glyph out of the rope is what lets oil’s text stay bare filenames (design §6): it renders, the buffer never contains it, and :w still diffs clean.