Skip to content

Commit ea5c81e

Browse files
Typos, clarification
1 parent 519e45b commit ea5c81e

1 file changed

Lines changed: 10 additions & 10 deletions

File tree

README.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,17 @@
99

1010
# TextFormation
1111

12-
TextFormation is simple rule system that can be used to implement typing completions and whitespace control. Think matching "}" with "{" and indenting.
12+
TextFormation is simple rule system that can be used to implement typing completions and whitespace control.
13+
14+
Think matching typing "{", hitting return, and getting "}" with indenting.
1315

1416
- Text system agnostic
15-
- Many pre-built filters for commmon language patterns
16-
- Compatible with multi-cursor systems
17-
- Support for multiple line-ending encodings
17+
- Many pre-built filters for common language patterns
18+
- Compatible with multiple cursors editing systems
19+
- Flexible whitespace calculations
1820

1921
> [!WARNING]
20-
> This library is undergoing some major changes. Not all functionality is currently implemented in the main branch yet.
22+
> The main branch has undergone some major changes to support new capabilities. Not all indentation calculation features are available quite yet.
2123
2224
## Integration
2325

@@ -29,14 +31,12 @@ dependencies: [
2931

3032
## Concept
3133

32-
TextFormation's core model is a `Filter`. Filters are typically set up once for a given language. From there, changes in the form of a `TextMutation` are fed in. The filter examines a `TextMutation` **before** it has been applied. Filters can be stateful, but if they return `MutationOutput`, it means it has processed the mutation and no futher action should be taken.
34+
TextFormation's core model is a `Filter`. Filters are typically set up once for a given language. From there, changes in the form of a `TextMutation` are fed in. The filter examines a `TextMutation` **before** it has been applied. Filters can be stateful, but if they return `MutationOutput`, it means it has processed the mutation and no further action should be taken.
3335

34-
TextFormation is fully text system-agnostic and it models the text system using an abstraction based on types from [Rearrange](https://github.com/ChimeHQ/Rearrange).
36+
TextFormation is fully text system-agnostic and it models the text system using an abstraction based on types from [Rearrange](https://github.com/ChimeHQ/Rearrange). This requires that you provide a `TextSystemInterface` implementation. This type is responsible for supporting the querying and mutation capabilities filters need, along with an abstraction for how text positions and ranges are represented.
3537

3638
## Filters
3739

38-
Using TextFormation requires that you provide a `TextSystemInterface` implementation. This type is responsible for supporting the querying and mutation capabilties filters need, along with an abstraction for how text positions and ranges are represented.
39-
4040
Careful filter ordering can produce some pretty powerful behaviors. Here's an example of a chain that produces typing completions that roughly matches what Xcode does for open/close curly braces:
4141

4242
```swift
@@ -69,7 +69,7 @@ let filter = StandardOpenPairFilter<MyTextSystem>(open: "{", close: "}")
6969

7070
Correctly indenting in the general case may require parsing. It also typically needs some understanding of the user's preferences. The included `TextualIndenter` type has a pattern-based system that can perform sufficiently in many situations.
7171

72-
It also includes pre-defined patterns for some languages:
72+
It includes `basicPatterns` that work well for many languages. There are also some pre-defined patterns:
7373

7474
```swift
7575
TextualIndenter.rubyPatterns

0 commit comments

Comments
 (0)