-
-
Notifications
You must be signed in to change notification settings - Fork 118
Cursor color #1
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
Comments
Thanks for the issue! I'll look into it to see how it affects the performance since it would have to update on |
I figured out a way to do this, so I'm going to write it here for my future reference when I get around to it (since I'm busy today). The mechanism for doing this with neovim doesn't exist right now to get the highlight under the cursor, so I'll have to maintain a memory of the highlight regions. I can maintain a single global table containing the highlight regions in order and do a binary search of list to find the cursors position (or a linear search, the performance will probably be negligible in difference), then I can ascertain the highlight under the cursor if a match is found. With an autocmd on CursorMove, I'll only need to calculate this array if the line number changes or the text changes, and not the column number, so it'll involve recalculating the current row, but with how quick that is, I don't think the performance will be a problem. If the buffer changes, this will also need to be invalidated/updated, which may or may not be covered by CursorMove. |
Implemented in #16, but unfortunately, I don't have a good way of testing this. Cursor color isn't a standardized terminal feature, and GUIs can implement it however they want. I recommend trying that branch if your terminal supports it and let me know if it works. |
Hi!
I just came around your plugin via your reddit post (I think it's yours) and I have a question:
Say I have the color
#FFFFFF
. When the cursor hovers on this text, I can't see it. Would it be possible to make nvim-colorizer.lua change the highlighting groupsnCursor
and / orCursor
so the cursor will be visible in such edge cases?The text was updated successfully, but these errors were encountered: