Skip to main content

rustaco_core/
lib.rs

1//! Text model for the Rustaco editor.
2//!
3//! No UI and no I/O: a rope buffer, multi-cursor selections, change sets,
4//! undo history and the editing commands. A [`TextModel`] can be shared by
5//! several editors, each with its own [`Cursors`]; [`Document`] bundles one
6//! model with one editor for the common case. Frontends (web and native) and
7//! services (syntax highlighting, LSP) consume the [`EditEvent`]s it emits.
8
9mod change;
10mod commands;
11mod decorations;
12mod diff;
13mod document;
14mod editor;
15mod history;
16mod keymap;
17mod model;
18mod position;
19mod search;
20mod selection;
21mod snippet;
22
23pub use change::{Assoc, ChangeSet, Edit, EditEvent};
24pub use commands::matching_bracket_text;
25pub use decorations::{Decoration, DecorationId, Decorations, Stickiness};
26pub use diff::{CharChange, Diff, DiffOptions, LineChange, diff};
27pub use document::Document;
28pub use editor::{Cursors, Editor, EditorId, word_at};
29pub use history::{EditKind, History, Transaction};
30pub use keymap::{Binding, KeyPress, Keymap, Platform, Resolved, default_keymap, eval_when, jetbrains_keymap};
31pub use model::{LanguageEditing, LineEnding, Options, Stale, TextModel};
32pub use position::{
33    Point, Position, Utf16Position, char_to_point, char_to_position, char_to_utf16, line_end, line_len,
34    position_to_char, utf16_to_char,
35};
36pub use ropey::{Rope, RopeSlice};
37pub use search::{SearchQuery, Searcher, next_match};
38pub use selection::{Selection, Selections};
39pub use snippet::{SNIPPET_OWNER, SNIPPET_STOP, Snippet, SnippetSession, TabStop};