trevyn / turbosql

An easy local data persistence layer for Rust, backed by SQLite.
211 stars 8 forks source link

Make an embedded-in-`.rs` SQL pretty-printer #20

Open trevyn opened 2 years ago

trevyn commented 2 years ago

Separate binary that can be run that uses syn to parse out .rs files, replace strings with SQL with pretty-printed, then run rustfmt afterwards. Can swap this in with rust-analyzer.rustfmt.overrideCommand.

See also: https://crates.io/crates/sqlformat and https://crates.io/crates/prettyplease

trevyn commented 2 years ago

Also see https://github.com/DioxusLabs/dioxus/issues/368 for an example of pretty-printing macro contents in a VSCode extension