You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, I noticed that scrolling my Neovim buffer will scroll the browser Markdown view but not the other way round. Is this intentional? If so, would it be possible to add support for this?
The text was updated successfully, but these errors were encountered:
Hello! Yes, this is intentional. I'm afraid that with the current architecture it's not possible to add this. The communication we have looks something like this:
browser <-> vivify-server <- vim
I.e. while there is two-way communication between the browser and the server, Vim only talks to the server but not the other way around, meaning it's not possible to send messages to Vim.
Unless lots of people ask for this or something else that requires implementing this backwards communication, I'd honestly prefer not implementing it because it adds a lot of complexity to the system.
That said, you could in theory implement it for yourself without needing to modify Vivify:
You can use Vivify's config to add client-side scripts, which will allow you to use JS to detect the browser window's scroll location and read the source file line numbers of the elements on screen. Then you can make a small Vim plugin that (e.g.) runs a server with an endpoint you can POST to to scroll the editor to a given line. With that, all that would be left is to make that POST request from your custom client-side script :)
In case you want to do this and need support with the client-side script, let me know and I'll do my best to help!
Hello, I noticed that scrolling my Neovim buffer will scroll the browser Markdown view but not the other way round. Is this intentional? If so, would it be possible to add support for this?
The text was updated successfully, but these errors were encountered: