Add vitual text at cursorline showing index/group/total#72
Conversation
| end | ||
|
|
||
| _G.Total_Count = 0 | ||
| function List:setup(opts) |
There was a problem hiding this comment.
Not sure how to pass this information to preview, do you have any suggestions?
| { | ||
| virt_text = { | ||
| { '[' .. cur_index .. '/' .. total_count .. ']', 'NoiceVirtualText' }, | ||
| }, |
There was a problem hiding this comment.
The highlight name is waiting for your decision:)
|
Hey, thanks for the PR!
I was planning to work with virtual text for another feature, was waiting for window local extmarks feature to be merged into neovim neovim/neovim#27361 which should resolve my 2nd point. Give me some time to research this extmark thing a bit. |
|
Hi, I don’t know window local extmarks before, that’s nice, it may be used to shift the code in parent window while keep preview window unaffected.
Yes, that can be a format function exposed to users, I’m using 0.10 now and am happy to experiment a bit:) |
https://github.com/DNLHC/glance.nvim/assets/97848247/1342bd51-549f-4d70-915f-309295811bf3
With this change, I no longer need to look at right list.
If there is only one group, show index/total, otherwise, show index/group/total, from the screenshot above, you can see list cursorline disappears after winscroll, as I mentioned in #70 (comment)