1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
//! TWrite is a fast, modular text editor engine for GPUI.
//!
//! It provides rope-backed text editing, multi-span syntax highlighting,
//! a versatile hook system for modal editing and smart pairs, and GPU-accelerated rendering.
//!
//! # Layout
//!
//! Most users need only this facade crate: [`Editor`] plus the hook traits
//! and batteries. It re-exports two layers:
//!
//! - `twrite-core`: headless buffer, movement, syntax,
//! hooks, and structured keys (`KeyCode`, `KeyHint`). Usable without
//! GPUI (servers, CLIs, tests). See <https://docs.rs/twrite-core>.
//! - `twrite-gpui`: canvas rendering, theming, configuration, and the
//! interactive [`Editor`] view.
//!
//! # Quick start
//!
//! ```toml
//! [dependencies]
//! gpui = "0.2"
//! twrite = "0.9"
//! ```
//!
//! ```rust,no_run
//! use gpui::*;
//! use twrite::Editor;
//!
//! Application::new().run(|cx: &mut App| {
//! cx.open_window(WindowOptions::default(), |_, cx| {
//! cx.new(|cx| Editor::new("Hello from TWrite!", cx))
//! })
//! .unwrap();
//! cx.activate(true);
//! });
//! ```
//!
//! # Features
//!
//! - `markdown`: CommonMark/GFM highlighter (`markdown` module) and task widgets.
//! - `wayland`, `x11`, `font-kit`: platform-backend passthrough to `gpui`
//! (its defaults already include all three).
//!
//! [`Editor`]: https://docs.rs/twrite-gpui/latest/twrite_gpui/struct.Editor.html
/// Core buffer, syntax, movement, and hook primitives.
pub use *;
/// GPUI canvas rendering, theming, configuration, and editor view.
pub use *;
/// CommonMark and GitHub Flavored Markdown highlighter and interactive hook.