Skip to main content

Module oil

Module oil 

Source
Expand description

Oil buffer model – re-exported from lattice-oil.

Moved from lattice-ui-tui in Phase 5.2 first wave. Same shape as crate::file_tree: host-side canonical path, lattice-ui-tui re-exports for backward compat.

Modules§

modes
oil-mode – major mode for the oil.nvim-style editable directory listing buffer.

Structs§

OilDir
BufferLocal carrying the filesystem path the oil buffer’s listing represents (M.3.2.c.3 mirror of OilBuffer::dir). Renderers / writers read through this rather than poking OilBuffer::dir directly so the canonical “what directory does this oil buffer represent” lookup is uniform with the rest of the mode-owned per-buffer state.
OilEntry
OilMode
Major mode for oil-style directory-listing buffers. Any buffer whose major is oil-mode is an OilBuffer; the renderer dispatches accordingly.
OilSnapshot
The directory state an oil buffer diffs against: the entries as they were at open, or at the last successful :w.

Functions§

listing_entries
Project the snapshot into the shape directory-listing-mode reads. icon_byte is 0 — oil rows are bare names, so the icon leads.
register_oil_modes
Register every lattice-oil-owned mode against registry. Called from the App’s boot path alongside lattice_mode::register_foundation_modes, lattice_syntax::register_language_modes, and lattice_lsp::register_lsp_log_modes. Mirrors the same per-feature-crate registration pattern.
render_to_text
Render snapshot entries to a rope — one bare name per line, no icons. The listing text: one bare filename per line, dirs-first alpha.