feat: allow clearing a color with highlight group #1709
Closed
+103
−90
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Implements #1306.
I couldn't confidently determine if the value really was
"NONE"
- the method used by this plugin returnsnil
andvim.api.nvim_get_hl(0, { name = <hlgroup> })
returnsvim.empty_dict()
.With this change, if the highlight links to a non-existing group, it will be transparent. I couldn't think of a way to avoid this.
EDIT: I was planning to investigate this a bit more, but accidentally submitted the PR. I think this could be a valid solution, so I'm leaving it as is for now.