jbyuki / instant.nvim

collaborative editing in Neovim using built-in capabilities
MIT License
1.29k stars 25 forks source link

Enhancement: Use extmark instead of deprecated virtual text. #17

Closed rag-hav closed 2 years ago

rag-hav commented 2 years ago

vim.api.nvim_set_virtual_text has been deprecated in Neovim. The API that replaces it vim.api.nvim_set_extmark is more feature-rich and allows for virtual text on the right side of the window.

Like this-

image

The screenshot if after making changes in the lua/instant.lua file. I do not understand the src code (or ntangle) enough to create a PR for this.

jbyuki commented 2 years ago

Thank you for looking into this. That's too bad you made the changes but can't merge them into the main repository.

I will try to check your fork, do the changes and credit you somehow.

In case, you still want to look into ntangle, it's really not that hard to use. I'm using it mainly as an experiment to try to explore literate programming. But I'm aware it's not for everybody. When ntangle.nvim is installed, you could in principle modify the lua.t files and the changes will be reflected in the lua files. For minor modifications, you don't need to understand the syntax of ntangle. I'm saying all this for any future changes, but I will do this one in a moment.