Skip to content

Commit a5dcce6

Browse files
authored
refactor(scenarios): add syntax highlighting and realistic Rust code (#118)
* refactor(scenarios): use realistic code content for basic/ and movement/ scenarios (WIP) Updated scenarios to use multi-line Rust code instead of simple strings: - basic/delete.toml, insert.toml, replace.toml - movement/basic-movement.toml, word.toml, word-basics.toml - movement/line.toml, line-navigation.toml Work in progress - more files to update. * feat(ui): add syntax highlighting and simplify scenarios - Add syntect 5.3 for Rust syntax highlighting in editor view - Create highlight.rs module with LazyLock for static initialization - Use base16-eighties.dark theme for terminal display Simplify scenarios to minimize text input (focus on commands): - insert.toml: reduce typing to 0-2 characters per scenario - repeat/basic-repeat.toml: simplify repeat_insert_001 - Fix cursor positions to match simulator behavior All 141 scenarios pass execution tests. * refactor(scenarios): update remaining scenarios with realistic Rust code - Update clipboard/ scenarios (undo-redo, yank-paste) - Update editing/ scenarios (delete-selection, indentation, join) - Update movement/ scenarios (combined, document, find-till, goto-commands, match-brackets, precision) - Update search/ scenarios (basic-search) - Update selection/ scenarios (line-selection) - Fix cursor rendering for end-of-line positions in highlight.rs All 136 scenarios now use realistic Rust code snippets for proper syntax highlighting. * refactor(scenarios): complete realistic Rust code for remaining scenarios - Update editing/advanced-editing.toml with Rust code - Update editing/surround.toml with Rust code - Update selection/advanced-selection.toml with Rust code - Update repeat/basic-repeat.toml with Rust code - Fix test expectations for repeat_insert_001 scenario All 136 scenarios now use realistic Rust code snippets. * fix(scenarios): update paragraph scenarios with realistic Rust code and selection - Replace generic paragraph text with realistic Rust functions - Add selection field to target state for ]p and [p commands - These commands create a selection from original position to new position This fixes the visual mismatch where target state didn't show the selection that ]p/[p commands actually produce. * release: prepare v0.5.3 - Bump version to 0.5.3 - Update README: 136 scenarios, Phase 2.2 status, remove Vim references - Update CHANGELOG with v0.5.3 changes and fix version links - Update HELIX_KEYBINDINGS.md: mark 90+ implemented commands
1 parent 18b58ef commit a5dcce6

35 files changed

+1899
-1037
lines changed

CHANGELOG.md

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,29 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
## [0.5.3] - 2026-01-09
11+
12+
### Added
13+
14+
- **Syntax highlighting for scenario code** — Rust code in scenarios now displays with full syntax highlighting using syntect
15+
- **Adaptive difficulty system** — Mini-game difficulty adjusts based on player performance metrics
16+
17+
### Changed
18+
19+
- **136 scenarios with realistic Rust code** — All scenarios updated from minimal synthetic text to real, idiomatic Rust code snippets
20+
- **Paragraph commands use Helix keybindings** — Changed from Vim-style `{`/`}` to Helix-style `[p`/`]p` paragraph navigation
21+
22+
### Fixed
23+
24+
- **Paragraph scenario selection visibility** — Target states now correctly show selection range for `]p`/`[p` commands
25+
- **Cursor rendering at end-of-line** — Cursor now displays correctly when positioned at the end of a line
26+
27+
### Quality
28+
29+
- **Tests**: 1239+ (up from 1116)
30+
- **Clippy**: Zero warnings
31+
- **Scenarios**: 136 total (realistic Rust code content)
32+
1033
## [0.5.2] - 2026-01-07
1134

1235
### Added
@@ -1037,7 +1060,10 @@ With this release, all Phase 1 components are fully implemented:
10371060

10381061
---
10391062

1040-
[Unreleased]: https://github.com/bug-ops/helix-trainer/compare/v0.5.0...HEAD
1063+
[Unreleased]: https://github.com/bug-ops/helix-trainer/compare/v0.5.3...HEAD
1064+
[0.5.3]: https://github.com/bug-ops/helix-trainer/compare/v0.5.2...v0.5.3
1065+
[0.5.2]: https://github.com/bug-ops/helix-trainer/compare/v0.5.1...v0.5.2
1066+
[0.5.1]: https://github.com/bug-ops/helix-trainer/compare/v0.5.0...v0.5.1
10411067
[0.5.0]: https://github.com/bug-ops/helix-trainer/compare/v0.4.8...v0.5.0
10421068
[0.4.8]: https://github.com/bug-ops/helix-trainer/compare/v0.4.7...v0.4.8
10431069
[0.4.7]: https://github.com/bug-ops/helix-trainer/compare/v0.4.6...v0.4.7

0 commit comments

Comments
 (0)