Skip to main content

Module indent

Module indent 

Source
Expand description

Indentation units and methods.

IndentUnit is the resolved answer to “what is one level of indent, in this buffer, right now” — shiftwidth + expandtab + tabstop collapsed into one Copy value. It lives here rather than in lattice-indent (the tree-sitter engine, IN.2) because the > / < operators in lattice-grammar consume it, and lattice-syntax → lattice-grammar means an engine-side home would be a dependency cycle. This crate is the shared floor both sides already stand on, and it is where the sibling crate::FoldMethod lives for the same reason.

Nothing here reads config. The host resolves the options (including any buffer-local :setlocal override) and hands the resulting value down; the grammar layer stays config-agnostic.

See docs/dev/architecture/auto-indent.md §3.

Structs§

IndentUnit
One level of indentation, resolved for a specific buffer.

Enums§

IndentMethod
:set indentmethod=.... Which source decides where a newly created line starts.