David-Kunz / gen.nvim

Neovim plugin to generate text using LLMs with customizable prompts
The Unlicense
977 stars 62 forks source link

feat: support changes to nvim_buf_set_text() #82

Closed jmdaly closed 3 months ago

jmdaly commented 3 months ago

Hi David,

I'm still really enjoying working with your plugin!

I've noticed that on nightly versions of neovim (0.10-dev), there have been changes made to the nvim_buf_set_text() api. I believe the relevant PR that brought the changes in is this one. As a result, when using gen.nvim in split mode, the buffer no longer scrolls as expected when ollama generates text that scrolls past the end of the viewable area. This PR adds support for proper buffer scrolling in nightly neovim versions (0.10-dev) while maintaining the functionality in the current stable versions of neovim. I believe that these changes to nvim_buf_set_text() will be in the next stable release of neovim.

Hopefully this will be useful, and if there are any changes you'd like me to make to the PR, I'd be glad to :)

Thanks, John

David-Kunz commented 3 months ago

Hi John,

Thanks a ton for your nice comment PR, highly appreciated ❤️

Best regards, David