It would be great if there was a way to extend rustfmt to format code in other languages contained within Rust source files.
For example, sqlx defines macros query!, query_as!, etc. which accept string literals containing SQL. I would like to be able to bring a SQL formatter and integrate it with rustfmt.
Thanks for reaching out. Similar topics have been brought up before, and at the moment the team isn't sure it makes sense to turn rustfmt into a platform to run other formatting tools.
It would be great if there was a way to extend rustfmt to format code in other languages contained within Rust source files.
For example, sqlx defines macros
query!
,query_as!
, etc. which accept string literals containing SQL. I would like to be able to bring a SQL formatter and integrate it with rustfmt.