Repository navigation
lib/types: add missing nvim_set_hl attrs - #4540
Draft
khaneliman wants to merge 1 commit into
Draft
khaneliman wants to merge 1 commit into
khaneliman wants to merge 1 commit into
Conversation
Declare the attributes that Neovim 0.12.4's pinned `api.txt` lists for `nvim_set_hl` but the highlight submodule did not: `fg_indexed`, `bg_indexed`, `blink`, `overline`, `dim`, `conceal`, `altfont`, `link_global`, `force`, and `update`. The submodule is freeform, so these keys already reached Neovim. What they gain is documentation, so a user can find them without reading `api.txt`. Booleans use `maybeRaw` and `link_global` follows `link`, so declaring a key takes away no value shape that `nvim_set_hl` accepts. Declaring does narrow against the bare freeform type: `force = 1` evaluated before and now fails, and the keyset agrees it was never valid. The highlight test exercises these as a realistic configuration. Because freeform keeps accepting the same values, that alone cannot detect a removed declaration, so a second case asserts the declarations directly through `types.highlight.getSubOptions`. Scope the descriptions to how Nixvim applies highlights. `force` only matters together with `default`, since `nvim_set_hl` already replaces a group otherwise. `update` needs the group to exist, so it belongs in `highlightOverride`, which runs after `colorscheme`. `link_global` behaves as `link` here, because Nixvim always applies at `ns=0`.
Contributor
Author
|
@MattSturgeon @GaetanLepage thoughts on maintenance debt when it comes to things that are actually neovim aligned. I know we didn't like plugins tracking options closely, but didn't know if we wanted to cover some of this stuff. |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Declares the ten
nvim_set_hlattributes from 0.12.4'sapi.txtthat thehighlight submodule lacked. The submodule is freeform so they already reached
Neovim; this puts them in the generated option reference.
Related #4538