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;
13pub mod diff_view;
14mod document;
15mod editor;
16mod fuzzy;
17mod history;
18mod keymap;
19mod model;
20mod position;
21mod search;
22mod selection;
23mod snippet;
24
25pub use change::{Assoc, ChangeSet, Edit, EditEvent};
26pub use commands::matching_bracket_text;
27pub use decorations::{Decoration, DecorationId, Decorations, Stickiness};
28pub use diff::{CharChange, Diff, DiffOptions, LineChange, diff};
29pub use document::Document;
30pub use editor::{Cursors, Editor, EditorId, word_at};
31pub use fuzzy::{FuzzyMatch, collect_words, fuzzy_score, rank_completions};
32pub use history::{EditKind, History, Transaction};
33pub use keymap::{Binding, KeyPress, Keymap, Platform, Resolved, default_keymap, eval_when, jetbrains_keymap};
34pub use model::{LanguageEditing, LineEnding, Options, Stale, TextModel};
35pub use position::{
36    Point, Position, Utf16Position, char_to_point, char_to_position, char_to_utf16, line_end, line_len,
37    position_to_char, utf16_to_char,
38};
39pub use ropey::{Rope, RopeSlice};
40pub use search::{SearchQuery, Searcher, next_match};
41pub use selection::{Selection, Selections};
42pub use snippet::{SNIPPET_OWNER, SNIPPET_STOP, Snippet, SnippetSession, TabStop};