parinfer

spinningarrow 2017-06-11T03:10:02.246530Z

@dominicm does it also only consider the parent form (like atom-parinfer) or the whole file?

shaunlebron 2017-06-11T06:21:10.691566Z

@spinningarrow it does whole file as of yesterday, but he’s looking into doing only parent form I believe

spinningarrow 2017-06-11T06:58:25.770478Z

Ah okay

spinningarrow 2017-06-11T06:58:25.770485Z

Ah okay

spinningarrow 2017-06-11T06:59:05.771871Z

I was playing with vim parinfer - in vim8 there are some autocommands we can use to call parinfer even in insert mode

spinningarrow 2017-06-11T06:59:20.772366Z

TextChangedI I think it was

dominicm 2017-06-11T07:21:48.824418Z

@spinningarrow yeah, TextChangedI is what is used.

dominicm 2017-06-11T07:22:54.826942Z

@shaunlebron during rewriting, I did a profile. On the whole file (1.3k) parinfer was near-instant. Like, so fast. The slow down was writing to the buffer, which I fixed by turning off code folding (the click to collapse feature in most ides)

dominicm 2017-06-11T07:24:18.830693Z

Trying to do top-level form detection is difficult. I looked at atom-parinfer's implementation & read surrounding issues, it's a bit of a hack with edge case concerns. As parinfer on whole file is fast already, I didn't bother.

spinningarrow 2017-06-11T07:27:15.837707Z

@dominicm ah nice, do you mean in neovim or vim?

dominicm 2017-06-11T07:27:34.838374Z

@spinningarrow in Neovim.

spinningarrow 2017-06-11T14:21:05.962948Z

Right. I was talking about trying to do the same for vim-parinfer as well; encouraging to know that that's how neovim-parinfer does it as well!

shaunlebron 2017-06-11T17:32:25.649647Z

@dominicm nice! i’ll install it today and give it a try