rust-playground
rust-playground copied to clipboard
Configuration option to "format on save"
Similar in spirit to #844 , it could be nice to have automatic formatting whenever the code is "submitted" (i.e. Run / Test / Build etc.), although I think this should probably be configurable in user settings.
One thing that might be tricky is order of operations — The current rustfmt implementation seems to minimize its output after running, which would be fine so long as the subsequent "Run" command showed the output again. If they were run in parallel this might be hard to synchronize, but if Format always ran prior to Run perhaps it wouldn't be an issue.
Possible UI mockup (probably default to DISABLED, to avoid changing behavior from existing):
Examples in other tools:
- https://go.dev/play/ (not my favorite playground, but I do like this particular feature)
- https://goplay.tools/