Does the atom integration of parinfer have forceBalance on by default?
I’m investigating https://github.com/cursive-ide/cursive/issues/1964, and the only way I can reproduce what they describe in the parinfer demo is by enabling forceBalance.
forceBalance is on by default in Atom
@chrisoakman may have been right if people don’t care about edge cases and just want guaranteed balance
(it was his decision to have forceBalance on by default in atom)
Several people have complained about it to me, but I don’t know how representative that is.
I have at least one vigorous vote for forceBalance. One thing I hadn’t considered is that when forceBalance is off, cutting and pasting unbalanced code causes the editor to mark errors that the user has to fix by hand sometimes.
I wonder, is it possible to detect the edge conditions (when forceBalance is on) and return their location, so that editors could provide a popup saying something along the lines of “you might want to double check I did the right thing here”?
I don’t know how annoying that would be.
I guess it might very frequently indicate correct code, such that people end up ignoring it anyway and missing cases when the code is actually broken.
I’m also struggling with a bug at the moment due to returning edits. When the paren trail is clamped to the cursor and there are edits within the paren trail, that’s very hard to calculate correctly. I may have to revisit edits in light of that.