gpui_editor/lib.rs
1//! A standalone editor component for GPUI
2//!
3//! This crate provides a text editor widget for GPUI applications with syntax highlighting support.
4//!
5//! # Architecture
6//!
7//! The editor is structured in three layers:
8//!
9//! - **Editor**: The core data model and editing operations
10//! - **EditorElement**: The GPUI element that renders an Editor
11//! - **EditorView**: A complete view with keyboard handling (see examples)
12
13pub mod buffer;
14pub mod editor;
15pub mod element;
16
17pub mod syntax_highlighter;
18
19// Internal modules
20mod meta_line;
21
22// Re-export main types
23pub use buffer::{GapBuffer, TextBuffer};
24pub use editor::{CursorPosition, Editor, EditorConfig};
25pub use element::EditorElement;
26// Re-export keymap types from gpuikit-keymap
27pub use gpuikit_keymap::extensions::{bind, create_bindings, BindingBuilder};
28pub use gpuikit_keymap::{BindingSpec, Keymap, KeymapCollection};
29pub use meta_line::{Language, MetaLine, Selection};
30pub use syntax_highlighter::SyntaxHighlighter;
31
32// Re-export gpui for convenience
33pub use gpui;