Fork me on GitHub
#parinfer
<
2018-04-17
>
cfleming01:04:08

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

cfleming01:04:35

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.

shaunlebron15:04:01

forceBalance is on by default in Atom

shaunlebron15:04:19

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

shaunlebron15:04:45

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

cfleming21:04:18

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

cfleming23:04:28

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.

cfleming23:04:56

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

cfleming23:04:53

I don’t know how annoying that would be.

cfleming23:04:28

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.

cfleming23:04:25

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.