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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
//! # hjkl-editor
//!
//! Front door for the hjkl modal editor stack. Re-exports the working
//! parts of [`hjkl_engine`] and [`hjkl_buffer`] under a curated
//! namespace so downstream consumers (sqeel, buffr, hjkl binary) add
//! one dependency instead of three and don't need to know the
//! crate-split.
//!
//! Two layers ride alongside each other during the 0.0.x churn:
//!
//! - **Legacy surface** (today's runtime): the [`runtime`] module
//! re-exports the existing [`Editor`], [`KeybindingMode`], [`VimMode`],
//! [`Input`], [`Key`], [`SearchPrompt`], [`Registers`], [`Slot`], and
//! [`LspIntent`]. This is what sqeel-tui consumes today.
//! - **Planned surface** (0.1.0 SPEC): the [`spec`] module re-exports
//! the additive types from [`hjkl_engine::types`] —
//! [`spec::Pos`], [`spec::Selection`], [`spec::SelectionSet`],
//! [`spec::Edit`], [`spec::Mode`], [`spec::Style`], [`spec::Highlight`],
//! [`spec::Options`], [`spec::Input`], [`spec::Host`], [`spec::EngineError`].
//! Trait extraction will rewire the runtime onto these — once it
//! ships, [`runtime`] becomes a thin compat layer.
//!
//! ## Usage
//!
//! ```no_run
//! use hjkl_editor::runtime::{Editor, KeybindingMode};
//!
//! let mut editor = Editor::new(KeybindingMode::Vim);
//! editor.set_content("hello world");
//! ```
//!
//! Buffer and rope helpers are re-exported at the [`buffer`] module,
//! mirroring the [`hjkl_buffer`] surface.
//!
//! [`Editor`]: hjkl_engine::Editor
//! [`KeybindingMode`]: hjkl_engine::KeybindingMode
//! [`VimMode`]: hjkl_engine::VimMode
//! [`Input`]: hjkl_engine::Input
//! [`Key`]: hjkl_engine::Key
//! [`SearchPrompt`]: hjkl_engine::SearchPrompt
//! [`Registers`]: hjkl_engine::Registers
//! [`Slot`]: hjkl_engine::Slot
//! [`LspIntent`]: hjkl_engine::LspIntent
// Ex command driver — relocated from hjkl-engine in 0.0.5. Lives here
// because ex commands operate over the public Editor surface; engine
// stays focused on the FSM core.