mirror of
https://github.com/nix-community/nixvim.git
synced 2026-08-28 10:15:49 -05:00
Neovim's generated keyset types `fg`, `bg`, `sp`, `ctermfg`, `ctermbg`,
and `link` as `integer|string`, and `nvim_set_hl` accepts an integer for
each. Verified against the pinned 0.12.4:
nvim_set_hl(0, "X", { fg = 16711680, ctermfg = 1 })
Nixvim declared all six through `mkNullOrStr`, so those values failed to
evaluate even though the highlight submodule is freeform and would
otherwise have passed them through.
Widen them to `either int str`. An integer means a different thing per
attribute, so say which in each description: `fg`, `bg`, and `sp` take a
24-bit RGB value, `ctermfg` and `ctermbg` take a palette index, and
`link` takes a highlight group id.
`mkNullOrStr` has no remaining use in this file, so drop the import.