Fork me on GitHub
#parinfer
<
2017-07-08
>
shaunlebron00:07:49

made some good progress toward a unified mode this week. thanks @rgdelato for the nice example behaviors!

cfleming07:07:49

@shaunlebron That looks awesome!

tianshu07:07:56

looks awesome

tianshu08:07:37

so Is it the time to make parinfer v2 for each editor?

shaunlebron16:07:38

@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

sekao16:07:08

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.

shaunlebron16:07:16

ah! I didn’t realize this solved that caveat

shaunlebron16:07:17

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

shaunlebron16:07:14

wish I could explain better, but it’s funny how that eluded me for so long

shaunlebron16:07:38

@sekao: is cursorDx easy to compute in your night editors?

sekao16:07:35

yeah is that just a delta of the cursor position before/after each change?

sekao16:07:53

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