Make it easier to debug missing parentheses
When my parentheses are off while writing Dart code, it's not clear where I should add or remove them. It can be frustrating trying to debug.
(Making things worse, VSCode doesn't add parenthesis when there's already a parenthesis to the right of a cursor. It often happens that I do not notice that a parenthesis that I meant to add wasn't added because of this.)
Please make it easier to find where to put a missing parenthesis.
One way to make it clearer would be to be able to have dartfmt run up until the first error. Right now dartfmt just doesn't run when there are analysis errors, but dartfmt-ing everything up to the first error might help me sort out parenthesis/brace problems through indents?
https://github.com/Dart-Code/Dart-Code/issues/3344 seems related too.
I'm not sure if we could reliably format up to the first error since truncating there would likely also be invalid code and rejected by dartfmt.
Although I wonder if we could try auto-inserting them at the location where there are "expected )"-style errors, then re-parse (and repeat) to see if we can end up with valid code?
Something similar was discussed for semicolons at https://github.com/dart-lang/sdk/issues/45427, though there were some ambigious cases. If we're able to only do it if it produces valid code, then that might cut out some of the issues (although it may also narrow the number of cases where it works too).
Also related to https://github.com/dart-lang/sdk/issues/46916