-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add vitual text at cursorline showing index/group/total #72
base: master
Are you sure you want to change the base?
Conversation
@@ -371,12 +371,14 @@ local function get_lsp_method_label(method_name) | |||
return utils.capitalize(lsp.methods[method_name].label) | |||
end | |||
|
|||
_G.Total_Count = 0 | |||
function List:setup(opts) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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)