prettier-plugin-rust
prettier-plugin-rust | topiary | |
---|---|---|
10 | 3 | |
167 | 486 | |
- | 2.9% | |
4.1 | 8.8 | |
12 months ago | 6 days ago | |
Rust | Rust | |
MIT License | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
prettier-plugin-rust
- Oxlint – written in Rust – 50-100 Times Faster than ESLint
-
Is rustfmt abandoned? Will it ever format `let ... else` syntax?
Same code formatted by Prettier Rust
-
Minimalist Rust formatter as an alternative to rustfmt?
There are alternatives to rustfmt: Prettier Rust and genemichaels
- Prettier Rust: An opinionated code formatter that autocorrects bad syntax
-
Configuring rust format to add line break before comments start
If you're open to using an alternative, here's how Prettier Rust would format your snippet:
- Prettier code formatter for Rust
- Prettier for Rust
topiary
-
Show HN: GritQL, a Rust CLI for rewriting source code
You should check out https://github.com/tweag/topiary
Yes, theoretically if you had ~identical grammars you could use it to do a full transpilation. There's a lot of challenges with that though. Writing a correct grammar for 1 language is complicated enough, but writing one for two where all your nodes and fields end up the same is likely insurmountable.
In practice, languages are either:
- Far enough apart that any pure AST transformation is insufficient and you need an AI component to produce usable output
-
Elastic Tab Stops (2017)
This is something we've discussed[1] in the development of Topiary, deferring the process to the formatter. It's not a priority issue for us right now, but given the lack of universal editor support for elastic tab stops, having the formatter do this seems like a reasonable solution.
[1]: https://github.com/tweag/topiary/issues/170
-
Minimalist Rust formatter as an alternative to rustfmt?
build on top of https://github.com/tweag/topiary/blob/main/languages/rust.scm
What are some alternatives?
rustfmt - Format Rust code [Moved to: https://github.com/rust-lang/rustfmt]
goformat - Alternative to gofmt with configurable formatting style (indentation etc.)
rustfmt - Format Rust code
genemichaels - Even formats macros
darker - Apply black reformatting to Python files only in regions changed since a given commit. For a practical usage example, see the blog post at https://dev.to/akaihola/improving-python-code-incrementally-3f7a
rfcs - RFCs for changes to Rust
prettyplease - A minimal `syn` syntax tree pretty-printer
cbfmt - A tool to format codeblocks inside markdown and org documents.
oxc - ⚓ A collection of JavaScript tools written in Rust.