Open
Description
When editing in build() methods, if the braces/parens aren’t balanced, hitting format will destroy the file. When you go to hit undo, IntelliJ asks if you want to undo through the format operation (which breaks your flow, to have to answer a dialog).
And for context, it's very easy when refactoring build methods - adding, removing, and reordering widgets - to get into a state where the parens are unbalanced.
We should:
- verify that intellij is using the analysis server for formatting when the file is mis-formed
- follow up with dartfmt about being able to format bad files
- have intellij not ask about undoing through a format operation
- possibly, make the IntelliJ formatter (not dartfmt) format better when there are unbalanced (possibly related to https://youtrack.jetbrains.com/issue/WEB-28954)