Skip to content

Add external formatter support#200

Merged
dannypsnl merged 3 commits intojeapostrophe:masterfrom
6cdh:external-formatter
Mar 22, 2026
Merged

Add external formatter support#200
dannypsnl merged 3 commits intojeapostrophe:masterfrom
6cdh:external-formatter

Conversation

@6cdh
Copy link
Copy Markdown
Collaborator

@6cdh 6cdh commented Mar 21, 2026

This PR switches the existing handwritten formatting logic to external formatters.

Currently, only racket-fixw is integrated because it's error-tolerant, and supports interactive mode.

  • For on type formatting, use interactive mode. It indents for empty lines as if there is an atom on these lines based on the context. So if user types enter, they are at the indented position, not the beginning of the line.
  • For full document and range formatting, use normal mode, that does not indent for empty lines because they are treated as trailing spaces.

Resolve #178

And after this change, we can use a handwritten text buffer to replace racket:text% class, and remove the GUI framework dependency.

@6cdh 6cdh marked this pull request as ready for review March 22, 2026 03:37
@6cdh 6cdh requested a review from dannypsnl March 22, 2026 03:38
Comment thread doclib/doc.rkt
@dannypsnl dannypsnl merged commit 5eec3b5 into jeapostrophe:master Mar 22, 2026
10 checks passed
@6cdh 6cdh deleted the external-formatter branch March 22, 2026 09:42
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.

Support external formatter

2 participants