Expand description
oil-mode – major mode for the oil.nvim-style editable
directory listing buffer.
Lives here (rather than in lattice-mode) per the
mode-architecture convention: “a mode lives with the crate
that owns its associated feature.” OilBuffer lives in
this crate, so the mode + the oil-mode-owned
BufferLocal state (OilDir) live here too.
The mode itself is metadata only: kind = Major, no
contributed options (oil is writable so it
contributes no ReadOnly override), no capability
requirements, no-op lifecycle hooks. Behaviour –
navigation, the rope-vs-snapshot diff, the
filesystem-op planner – lives on OilBuffer and the
consumer’s App surface.
Structs§
- OilDir
BufferLocalcarrying the filesystem path the oil buffer’s listing represents (M.3.2.c.3 mirror ofOilBuffer::dir). Renderers / writers read through this rather than pokingOilBuffer::dirdirectly so the canonical “what directory does this oil buffer represent” lookup is uniform with the rest of the mode-owned per-buffer state.- OilMode
- Major mode for oil-style directory-listing buffers. Any
buffer whose major is
oil-modeis anOilBuffer; the renderer dispatches accordingly. - OilSnapshot
Local - DL.5: the directory state
:wdiffs against.
Functions§
- register_
oil_ modes - Register every
lattice-oil-owned mode againstregistry. Called from the App’s boot path alongsidelattice_mode::register_foundation_modes,lattice_syntax::register_language_modes, andlattice_lsp::register_lsp_log_modes. Mirrors the same per-feature-crate registration pattern.