Skip to main content

Module headerline

Module headerline 

Source
Expand description

Generic sticky headerline — the one mechanism for a buffer to surface a status row pinned above line 0.

§Roles

  • Headerline — the trait. Any type that knows how to produce a row of cells (and a version counter) implements it. Tutor, multibuffer search, LSP status, VCS branch, diagnostics summary — all use this same surface.

  • SimpleHeaderline / SimpleHeaderlineHandle — the ready-made implementation for modes that want owned dedicated state. The handle is cheap-clone, updates via a closure, and bumps the version atomically. Modes that already carry their state elsewhere (e.g. an LSP session struct) implement Headerline directly.

  • HeaderlineProvider — wraps any Headerline impl and registers it as a VirtualRowProvider. Always emits one VirtualRowKind::Sticky row anchored above line 0; returns an empty vec when the impl returns None (hide the row).

§Design anchor

docs/dev/architecture/headerline.md

Structs§

HeaderlineProvider
VirtualRowProvider that emits one sticky row above line 0 from any Headerline impl.
HeaderlineRow
The row produced by a Headerline impl when it wants to be visible.
SimpleHeaderline
Ready-made Headerline impl for modes with dedicated header state.
SimpleHeaderlineHandle
Cheap-clone handle to a SimpleHeaderline<S>.

Traits§

Headerline
Anything that can supply a sticky headerline row.