@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
Kakoune wants to do it by exposing the entire undo tree for the buffer (and uncommitted changes, which happens in insert mode before <esc>)
It will still require some edge-case tracking for parinfer, but it will work AFAICT.
The edge-cases are jumping around in the undo tree and when uncommited modifications that we've processed are committed.
One thing to note is that Kakoune uses diffing itself when an external tool updates the buffer. But not for normal edits.
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
this makes sense, no way around that
interesting, i was thinking that parinfer should not run navigating history
but instead that parinfer’s post-processed results after each change would be the state committed to the history tree, ideally
Yeah, this is true. It would involve a hook after change and before commit, which doesn't exist.
Hmmm
I've got nothing to lose to propose that, and it might not be hard now that I think of it.