Holochain Forum


I’m wondering if there’s a way to create a syntext plugin for neovim to support real-time collaborative editing.

neovim supports co-processes, so a Holochain conductor could be spun up with syn running, and then some sort of IPC mechanism could support the rendering & tracking of edit commands between that process and the neovim UI (with the conductor of course synchronizing changes with the conductors of other agents editing the same document). it might be tricky to present a file-like API to neovim - I’d expect that to be a challenging part of the project.

presumably other editors could be supported too, with a modular-enough architecture.

I might dig into implementing this. making a topic in case others have had the same idea or find it interesting.


jotting some thoughts here:

I think we’ll encounter difficulties with the filesystem API.
I expect that vim expects to have the ability to write a whole bunch of bytes to a file.
syntext wants to do incremental input, so that it can show that to the other parties.
vim would be a sort of block-write interface, which seems incompatible?

promising-looking Rust crate which aids in developing neovim plugins: neovim-rs. there are others, but this seems the most actively developed in my quick glancing.

seems like there exists an ability to receive e.g. cursor positions in insert mode (src), which is promising. looking just now, I can’t find where a list of all such commands is defined… searching for those keywords doesn’t turn up neovim canonical names… :thinking: