Expand description
§fission-text-engine
Production-quality text buffer for a code editor.
This crate provides the text storage and manipulation layer — it is deliberately not an editor. It owns:
- A rope-backed
TextBufferwith O(log n) edits, - A
LineIndexthat maps between byte offsets,(line, col)pairs, and UTF-16 code-unit columns (the encoding used by the Language Server Protocol), - An
EditHistorywith bounded undo / redo stacks built onEditTransactions, - A
CoordinateMapperthat translates freely between the three coordinate systems (byte offset, line/col, LSP position).
Re-exports§
pub use buffer::TextBuffer;pub use coordinate::CoordinateMapper;pub use coordinate::LspPosition;pub use edit::EditHistory;pub use edit::EditTransaction;pub use edit::TextEdit;pub use line_index::LineCol;pub use line_index::LineIndex;
Modules§
- buffer
- Rope-backed text buffer with revision tracking.
- coordinate
- Coordinate mapper: byte offset <-> line/col <-> LSP position (UTF-16).
- edit
- Edit primitives, transactions, and undo/redo history.
- line_
index - Efficient mapping between byte offsets and line/column positions.