forked from sorawee/fmt
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
2 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,4 @@ | ||
fmt | ||
fmt: a code formatter for Racket | ||
=== | ||
|
||
A code formatter for Racket. | ||
|
||
Work in progress. | ||
|
||
To run, install the package (`raco pkg install fmt`) and run `raco fmt <your-code.rkt>`. | ||
|
||
### Principles | ||
|
||
- A reformat of an OK code (with potentially bad style) should look OK. A reformat of a not OK code (macro-expansion error, read error) can look bad or even error (in case of read error). | ||
- Changes must be only cosmetic. No content addition or removal. | ||
|
||
### Related efforts | ||
|
||
- [DrRacket](https://github.com/racket/drracket/): Only indent. Customizable with limited styles | ||
- [`raco-format`](https://github.com/mxork/raco-format/): Only indent. Using DrRacket's code internally | ||
- [Racket Mode](https://racket-mode.com/): Only indent. Customizable with limited styles | ||
- [`racket/pretty`](https://docs.racket-lang.org/reference/pretty-print.html): Prints from an S-expression, meaning comments are not supported. Does not care about paren-shape. Tends to lump everything on one line. | ||
- [`racket-pretty-printer`](https://github.com/Shuumatsu/racket-pretty-printer): Not customizable. Using Wadler's pretty printer, which is suboptimal and not expressive enough for our purpose. | ||
View the documentation and demo at https://docs.racket-lang.org/fmt/. |