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
//! Core primitives for the kernel.
//!
//! Linux equivalent: Core kernel functionality
//!
//! This module provides the foundational abstractions for editor operations:
//!
//! - **Motion**: Pure cursor movement calculations
//! - **`TextObject`**: Text object range calculations for operators
//! - **Register**: Yank/paste storage (without clipboard integration)
//! - **Mark**: Bookmark operations
//!
//! # Design Philosophy
//!
//! Following Linux kernel "mechanism, not policy":
//! - Kernel provides *how* to calculate motions (mechanisms)
//! - Modules decide *what* keys trigger which motions (policies)
//!
//! All calculations are pure functions with no side effects.
//! The buffer is never modified by these operations.
//!
//! # Example
//!
//! ```
//! use reovim_kernel::api::v1::*;
//!
//! let buffer = Buffer::from_string("hello world");
//! let cursor = Cursor::new(Position::new(0, 0));
//!
//! // Calculate where 'w' motion would land
//! let new_pos = MotionEngine::calculate(
//! &buffer,
//! &cursor,
//! Motion::Word {
//! direction: Direction::Forward,
//! boundary: WordBoundary::Word,
//! end: false,
//! },
//! 1,
//! );
//!
//! assert_eq!(new_pos, Some(Position::new(0, 6)));
//! ```
// Re-export direction types
pub use ;
// Re-export history types
pub use HistoryRing;
// Re-export jumplist types
pub use ;
// Re-export mark types
pub use ;
// Re-export motion types
pub use ;
// Re-export register types
pub use ;
// Re-export text object types
pub use ;
// Re-export option types
pub use ;
// Re-export config types
pub use ;
// Re-export mode types
pub use ;