Skip to content

Commit 91def8e

Browse files
committed
delete file
1 parent 5a111f6 commit 91def8e

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

docs/architecture.md

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@
1212

1313
This document contains a high-level overview of Helix internals.
1414

15+
> NOTE: Use `cargo doc --open` for API documentation as well as dependency
16+
> documentation.
17+
1518
## Core
1619

1720
The core contains basic building blocks used to construct the editor. It is
@@ -20,13 +23,21 @@ are functional: most operations won't modify data in place but instead return
2023
a new copy.
2124

2225
The main data structure used for representing buffers is a `Rope`. We re-export
23-
asaddthe excellent [ropey](https://github.com/cessen/ropey) library. Ropes are cheap
26+
the excellent [ropey](https://github.com/cessen/ropey) library. Ropes are cheap
2427
to clone, and allow us to easily make snapshots of a text state.
2528

2629
Multiple selections are a core editing primitive. Document selections are
2730
represented by a `Selection`. Each `Range` in the selection consists of a moving
2831
`head` and an immovable `anchor`. A single cursor in the editor is simply
29-
a selction with a single range, with the head and the anchor in the same
32+
a selection with a single range, with the head and the anchor in the same
33+
position.
34+
35+
Ropes are modified by constructing an OT-like `Transaction`. It represents
36+
a single coherent change to the document and can be applied to the rope.
37+
A transaction can be inverted to produce an undo. Selections and marks can be
38+
mapped over a transaction to translate to a position in the new text state after
39+
applying the transaction.
40+
3041
> NOTE: `Transaction::change`/`Transaction::change_by_selection` is the main
3142
> interface used to generate text edits.
3243
@@ -97,3 +108,4 @@ The `main` function sets up a new `Application` that runs the event loop.
97108

98109
## TUI / Term
99110

111+
TODO: document Component and rendering related stuff

0 commit comments

Comments
 (0)