How to config the formatter to just reload the file after format instead of read from the output of the formatter ? #9501
-
I'm using dioXus in my rust project, and I need to use the custom formatter from dioxus because of its special macro, but the output infomation will cover my source code, instead of the code after formatting |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
The formatter needs to output to stdout otherwise it won't work. Every formatter I ever encountered has an option for that. Reloading the file from disk unsuited since that is essentially a race condition |
Beta Was this translation helpful? Give feedback.
-
@pascalkuthe now I'm trying to cargo fmt first and then do dx fmt but It's seems that it has a problem |
Beta Was this translation helpful? Give feedback.
-
all right, solved by
|
Beta Was this translation helpful? Give feedback.
The formatter needs to output to stdout otherwise it won't work. Every formatter I ever encountered has an option for that.
Reloading the file from disk unsuited since that is essentially a race condition