Input module layout
The public Rust module remains gpui_base::input; the folders below organize its implementation without adding public module-path segments.
base/contains the shared text-editing engine and foundational behavior:
state, layout, cursor, selection, movement, touch selection, masking, native integration, and painting.
input/contains the single-lineInputelement andInputStatefacade.textarea/contains the multi-lineTextareaelement andTextareaState
facade.
editor/contains theEditorelement andEditorStatefacade together
with display mapping, highlighting, search, diagnostics, decorations, indentation, and LSP integration.
mod.rs is the external seam. Keep public re-exports there so reorganizing the implementation does not change callers' imports.
The root uses explicit #[path] declarations so this organization remains an implementation detail and existing internal module relationships stay intact.
Source
| 1 | # Input module layout |
| 2 | |
| 3 | The public Rust module remains `gpui_base::input`; the folders below organize |
| 4 | its implementation without adding public module-path segments. |
| 5 | |
| 6 | - `base/` contains the shared text-editing engine and foundational behavior: |
| 7 | state, layout, cursor, selection, movement, touch selection, masking, native |
| 8 | integration, and painting. |
| 9 | - `input/` contains the single-line `Input` element and `InputState` facade. |
| 10 | - `textarea/` contains the multi-line `Textarea` element and `TextareaState` |
| 11 | facade. |
| 12 | - `editor/` contains the `Editor` element and `EditorState` facade together |
| 13 | with display mapping, highlighting, search, diagnostics, decorations, |
| 14 | indentation, and LSP integration. |
| 15 | |
| 16 | `mod.rs` is the external seam. Keep public re-exports there so reorganizing the |
| 17 | implementation does not change callers' imports. |
| 18 | |
| 19 | The root uses explicit `#[path]` declarations so this organization remains an |
| 20 | implementation detail and existing internal module relationships stay intact. |