Open sdankel opened 1 year ago
Is this still open?
I think this is already supported. See https://github.com/FuelLabs/sway/issues/4911. But this needs to dealt on a case-by-case basis.
It's still not yet supported in the formatter, but it sounds like it's not blocked.
Currently, if the code fails to build, the formatter will do nothing. Ideally, the formatter would still do basic formatting even when the code doesn't compile. For example, when there is a misspelled variable name but everything else is correct, it should still be able to format the document.
Here are the cases when cargo fmt does not run: https://github.com/rust-lang/rustfmt#limitations
We should aim for this as well.