Crate dioxus_autofmt

Source
Expand description

§dioxus-autofmt

Crates.io MIT licensed Build Status Discord chat

Website | Guides | API Docs | Chat

§Overview

dioxus-autofmt provides a pretty printer for the rsx syntax tree.

This is done manually with a via set of formatting rules. The output is not guaranteed to be stable between minor versions of the crate as we might tweak the output.

dioxus-autofmt provides an API to perform precision edits as well as just spit out a block of formatted RSX from any RSX syntax tree. This is used by the rsx-rosetta crate which can accept various input languages and output valid RSX.

§Contributing

  • Report issues on our issue tracker.
  • Join the discord and ask questions!

§License

This project is licensed under the MIT license.

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in Dioxus by you shall be licensed as MIT without any additional terms or conditions.

Structs§

FormattedBlock
A modification to the original file to be applied by an IDE
IndentOptions

Enums§

IndentType

Functions§

apply_formats
fmt_block
fmt_fileDeprecated
Format a file into a list of FormattedBlocks to be applied by an IDE for autoformatting.
try_fmt_file
Format a file into a list of FormattedBlocks to be applied by an IDE for autoformatting.
write_block_out
Write a Callbody (the rsx block) to a string