You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
cargo fmt only updates files in places which belong to my project while leptosfmt updates all files in the current directory, including the target folder.
Could leptosfmt somehow get the cargo fmt managed files and only work on these?
time cargo fmt
real 0m0.229s
user 0m0.204s
sys 0m0.009s
time leptosfmt .
real 0m11.845s
user 0m2.924s
sys 0m4.534s
I see these attempts in updateing all sorts of .rs files:
I've been inspired by leptosfmt to make a similar tool for Yew, yew-fmt, and the way I handled the issue of synchronisation with cargo fmt is by making yew-fmt copy the API of rustfmt and be a wrapper over it, i.e. by accepting the same keyword args, accepting not a directory, but individual files that are to be formatted, and calling rustfmt before any logic of its own. This allows for yew-fmt to be a drop-in replacement for rustfmt (to be dropped in as e.g. RUSTFMT=yew-fmt cargo fmt), and receive all the files that have to be formatted right from cargo by being invoked by it. Just dropping this here as an idea for a potential fix to this issue
cargo fmt
cargo fmt
only updates files in places which belong to my project whileleptosfmt
updates all files in the current directory, including the target folder.Could leptosfmt somehow get the
cargo fmt
managed files and only work on these?I see these attempts in updateing all sorts of .rs files:
So when I remove
target
and.direnv
I get:Which is still long but much more managable.
update
Just found this discussion: https://stackoverflow.com/questions/60989162/how-to-list-a-projects-source-files-using-the-cargo-crate
The text was updated successfully, but these errors were encountered: