made some good progress toward a unified mode this week. thanks @rgdelato for the nice example behaviors!
first look: https://www.youtube.com/watch?v=9iZfdfsoC5o
@shaunlebron That looks awesome!
looks awesome
so Is it the time to make parinfer v2 for each editor?
@doglooksgood would be nice for v2 to get beta-tested in each editor. there’s been a lot of changes that we have to port over to the non-js implementations, which I can help with
this is fantastic, shaun. it has one big advantage over my hack, which is that you can surround a multiline form with delimiters and it adjusts the indentation. mine adjusts indentation based on tools.reader data (before running parinfer), which isn't available when the form is temporarily broken.
ah! I didn’t realize this solved that caveat
this may not mean anything to anyone, but this was basically a one-line change to subtract the indentDelta when finding open-parens to pop off the stack: https://github.com/shaunlebron/parinfer/blob/master/lib/parinfer.js#L599
wish I could explain better, but it’s funny how that eluded me for so long
@sekao: is cursorDx easy to compute in your night editors?
yeah is that just a delta of the cursor position before/after each change?
yes
cool that should be easy. getting the absolute position from the top of the file is slow, but i think i can get away with computing it relative to the nearest form. gotta look into that