parinfer

eraserhd 2019-01-02T15:13:25.001500Z

@shaunlebron I've been working on getting a decent change API into Kakoune, see here and the linked tickets: https://github.com/mawww/kakoune/pull/2673

eraserhd 2019-01-02T15:14:20.002700Z

Kakoune wants to do it by exposing the entire undo tree for the buffer (and uncommitted changes, which happens in insert mode before <esc>)

eraserhd 2019-01-02T15:15:05.003600Z

It will still require some edge-case tracking for parinfer, but it will work AFAICT.

eraserhd 2019-01-02T15:16:43.004600Z

The edge-cases are jumping around in the undo tree and when uncommited modifications that we've processed are committed.

eraserhd 2019-01-02T15:18:03.005300Z

One thing to note is that Kakoune uses diffing itself when an external tool updates the buffer. But not for normal edits.

shaunlebron 2019-01-02T15:55:58.005900Z

good timing, i just typed out a status update on smart mode: https://github.com/shaunlebron/parinfer/blob/master/lib/README.md#status-update-2019-smart-mode

shaunlebron 2019-01-02T18:31:13.006200Z

this makes sense, no way around that

shaunlebron 2019-01-02T18:32:41.006400Z

interesting, i was thinking that parinfer should not run navigating history

shaunlebron 2019-01-02T18:33:33.006600Z

but instead that parinfer’s post-processed results after each change would be the state committed to the history tree, ideally

eraserhd 2019-01-02T19:00:43.006900Z

Yeah, this is true. It would involve a hook after change and before commit, which doesn't exist.

eraserhd 2019-01-02T19:00:52.007100Z

Hmmm

eraserhd 2019-01-02T19:01:57.007300Z

I've got nothing to lose to propose that, and it might not be hard now that I think of it.