Skip to content
This repository has been archived by the owner on Apr 1, 2020. It is now read-only.

[WIP] #2302 - Integrate with the buffer updates API #2330

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

bryphe
Copy link
Member

@bryphe bryphe commented Jun 18, 2018

This PR integrates with the buffer updates API. It deprecates / removes the old sync strategy, which wasn't 100% reliable.

This is a BREAKING CHANGE because it will necessitate neovim 0.3.0 - we won't keep the old strategy around.

Todo:

  • Remove old sync strategy from oni-core-interop/init.vim
  • Update NeovimBufferUpdateManager to call nvim_buf_attach when entering a buffer
  • Handle nvim_buf_detach event
  • Properly coerce the live-update input into ranges that the LSP expects
  • Add test case validating we get expected input
  • Update NeovimBufferUpdateManager tests to reflect the new behavior / interface

Current bugs:

  • Syntax highlighting is not working. Might be an issue with how the enter / update flow has changed with these chagnes
  • Incremental updates aren't working correctly with TypeScript. Need to debug in our LSP implementation further.

This will be nice though because before we were synchronizing the entire buffer if there were ever any multi-line editors or any normal mode edits - having a true incremental set of updates will be a big perf improvement in those cases!

@akinsho
Copy link
Member

akinsho commented Aug 23, 2018

@bryphe, preface: definitely not intended to rush or poke was wondering when/if you were still working on this, reason being I'm curious about trying to implement a treesitter syntax highlighter/higlighting opt. at some point (probably not v. soon) and would like to base it off an updated version of this because of the way tree-sitter works it basically seems like it would go hand in hand with incremental updates or rather it works on incremental parsing theres some research I'd need to do but either way since syntax highlighting's structure would change with this I'd rather wait

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants