-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
feat(highlight): ns=0 to set :highlight namespace #17187
Conversation
This comment has been minimized.
This comment has been minimized.
Ok good to know. FWIW I've done very little testing with this. Most of the work was just trying to understand how vim hl groups generally behave. I'll pass this through a full colorscheme and and work out more of the edge cases; and of course add tests. |
This comment has been minimized.
This comment has been minimized.
Ok. I did add a "WIP" to the title, but I've gone ahead and made this a draft as well.
Thanks. I also have my personal colorscheme to test for this: https://github.com/lewis6991/github_dark.nvim/blob/a0f6f75fc86f1a4f5e1760b0cda0c0258d51d2bc/lua/github_dark.lua#L30-L71, which was partially the motivation for working on this change. |
This comment has been minimized.
This comment has been minimized.
ACK. Thanks, I really appreciate the feedback. |
00db039
to
5ab589d
Compare
Finally, got round to debugging this, turns out neovim/src/nvim/highlight_defs.h Lines 174 to 178 in 5205bcc
|
This comment has been minimized.
This comment has been minimized.
I wasn't... Thanks EDIT: Fixed |
Yep, now it works -- no crash, and |
Don't know why CI is failing. Let's un-draft to see what the other jobs do. |
The CI Is a Harsh Mistress... |
9aea8da
to
5032c29
Compare
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.
LGTM, but I'll have to defer to @bfredl on the code itself.
Passing ns=0 to nvim_set_hl will alter the `:highlight` namespace.
BTW, is there any mechanism we can use to detect this change in plugins? Lots of users have some dev build of v0.7 so it would be beneficial to provide some way of checking this. My only idea would be to add something like This applies to the signs PR too. |
No, we don't do feature flags -- we only support:
Plugins are strongly recommended to follow the same policy. So in this (and the sign) case, plugins should just check |
Ok I guess...
This hasn't been so smooth in the past, but let's see how disruptive lewis6991/gitsigns.nvim#463 is. |
Yeah, there's a segment of the audience who can't resist the temptation of running the latest and shiniest, but can resist the temptation of doing so in an informed manner. The only thing that can be done is:
(Step 1 is exactly what I'm doing here, and anywhere else I can shoehorn it in.) |
Passing ns=0 to nvim_set_hl will alter the
:highlight
namespace.