Skip to content

feat(editor): add paredit editor, a terminal-native text editing session - #143

Merged
takeokunn merged 2 commits into
mainfrom
feat/editor-core
Aug 8, 2026
Merged

feat(editor): add paredit editor, a terminal-native text editing session#143
takeokunn merged 2 commits into
mainfrom
feat/editor-core

Conversation

@takeokunn

Copy link
Copy Markdown
Collaborator

Summary

  • Adds paredit-feature-editor, owning the text-buffer aggregate, cursor invariants, editing actions, and undo/redo session state behind a DocumentStore port.
  • Adds a thin raw-mode terminal adapter (paredit editor <file>) that translates keypresses into the feature's application API and renders the returned state.
  • Fixes two defects found while landing this WIP branch: a non-exhaustive Key::Ctrl match that failed the workspace build, and a dead Key::Quit variant that left Ctrl-C/Ctrl-Q/Escape wired to nothing (no interactive way to quit).
  • Corrects two test assertions that had miscalculated expected values (render escape sequence / redo-history buffer content) against the domain layer's actual, documented, and otherwise-tested behavior.
  • Registers editor in the capabilities contract test.

Test plan

  • cargo check --workspace --all-targets
  • cargo clippy -p paredit-feature-editor -p paredit-cli --all-targets (zero warnings)
  • cargo test -p paredit-feature-editor -p paredit-cli --lib (342 passed)
  • cargo test -p paredit-cli --test cli capabilities_contract (10 passed)
  • cargo fmt --check clean
  • full nix flake check (CI)

paredit-feature-editor owns the text-buffer aggregate, cursor
invariants, editing actions, and undo/redo session state behind a
DocumentStore port; the presentation layer adds a thin raw-mode
terminal adapter (paredit editor <file>) that translates keypresses
into the feature's application API and renders the returned state.

Also fixes two defects found while landing this branch: a non-
exhaustive Key::Ctrl match that made the workspace fail to compile,
and a dead Key::Quit variant that left Ctrl-C/Ctrl-Q/Escape wired to
nothing, so the editor had no interactive way to quit.
readme_contract::readme_commands_match_top_level_help caught the drift:
`paredit editor` exists in --help but was missing from the README table.
@takeokunn
takeokunn merged commit 36de9c4 into main Aug 8, 2026
10 checks passed
@takeokunn
takeokunn deleted the feat/editor-core branch August 8, 2026 16:34
@takeokunn takeokunn mentioned this pull request Aug 8, 2026
4 tasks
takeokunn added a commit that referenced this pull request Aug 8, 2026
Minor release: `paredit editor <file>` is a new interactive terminal
editor command (#143); `paredit edit format`/`paredit fix` also align
Common Lisp and Emacs Lisp indentation with Emacs/SLIME conventions
across 36 divergence patterns (#144). No removed or renamed stable
surface — the capabilities catalog diff against v1.5.0 is purely
additive (the new `editor` command only).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant