parinfer

cfleming 2018-04-17T01:21:08.000264Z

Does the atom integration of parinfer have forceBalance on by default?

cfleming 2018-04-17T01:22:35.000035Z

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.

shaunlebron 2018-04-17T15:58:01.000643Z

forceBalance is on by default in Atom

shaunlebron 2018-04-17T15:59:19.000175Z

@chrisoakman may have been right if people don’t care about edge cases and just want guaranteed balance

shaunlebron 2018-04-17T15:59:45.000030Z

(it was his decision to have forceBalance on by default in atom)

cfleming 2018-04-17T21:38:18.000074Z

Several people have complained about it to me, but I don’t know how representative that is.

cfleming 2018-04-17T23:46:28.000111Z

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.

cfleming 2018-04-17T23:48:56.000098Z

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”?

cfleming 2018-04-17T23:49:53.000344Z

I don’t know how annoying that would be.

cfleming 2018-04-17T23:50:28.000285Z

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.

cfleming 2018-04-17T23:52:25.000029Z

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.