neovim has nvim_buf_set_extmark
to create virtual text, it supports the "overlay" virtual text positon.
• virt_text_pos : position of virtual text. Possible values:
• "eol": right after eol character (default).
• "overlay": display over the specified column, without
shifting the underlying text.
• "right_align": display right aligned in the window.
• "inline": display at the specified column, and shift the
buffer text to the right as needed.
vim's prop_add
don't support the "overlay" virtual text position.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.
so what does overlay do?
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.
https://github.com/easymotion/vim-easymotion
https://github.com/hadronized/hop.nvim
vim-easymotion is a famous plugin used in vim, and hop.nvim is an alternative in neovim.
As the movivation of hop.vim says below:
Hop is a complete from-scratch rewrite of EasyMotion, a famous plugin to enhance the native motions of Vim. Even though EasyMotion is usable in Neovim, it suffers from a few drawbacks making it not comfortable to use with Neovim version >0.5 – at least at the time of writing these lines:
EasyMotion uses an old trick to annotate jump targets by saving the contents of the buffer, replacing it with the highlighted annotations and then restoring the initial buffer after jump. This trick is dangerous as it will change the contents of your buffer. A UI plugin should never do anything to existing buffers’ contents.
Because the contents of buffers will temporarily change, other parts of the editor and/or plugins relying on buffer change events will react and will go mad. An example is the internal LSP client implementation of Neovim >0.5 or its treesitter native implementation. For LSP, it means that the connected LSP server will receive a buffer with the jump target annotations… not ideal.
Hop is a modern take implementing this concept for the latest versions of Neovim.
The drawback of EasyMotion in Vim is that virtual text cannot be overlaid on top of the actual text. However, Neovim does support this feature.
https://github.com/lukas-reineke/indent-blankline.nvim also uses this feature.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.
so, can you show an example/screenshot what exactly this does?
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.