Expand description
Colorscheme setup. Colorscheme and highlight group configuration helpers.
Exposes a dictionary with a set function applying base UI preferences (dark background, termguicolors)
and custom highlight groups (diagnostics, statusline, general UI).
ยงNote on set_hl implementation
Highlight options are set through a Lua-based path (vim.api.nvim_set_hl) instead of the
direct C FFI binding (nvim_oxi::api::set_hl). This works around an ABI mismatch between
nvim-oxiโs SetHighlightOpts struct layout (targeting Neovim v0.11.3) and Neovim
v0.12.0-dev (886efcb853), where the cterm field in Dict(highlight) changed from
Object (32 bytes) to DictAs(highlight_cterm) / Dict (24 bytes), shifting all
subsequent fields and causing validation errors.
Structsยง
- LuaHl
Opts ๐ - Highlight options that serialize to a Lua table literal for use with
vim.api.nvim_set_hl().
Constantsยง
- COMMENTS_
FG ๐ - CURSOR_
BG ๐ - CURSOR_
FG ๐ - DIAGNOSTICS_
FG ๐ - DIAG_
ERROR_ ๐FG - DIAG_
HINT_ ๐FG - DIAG_
INFO_ ๐FG - DIAG_
OK_ ๐FG - DIAG_
WARN_ ๐FG - GITSIGNS_
ADDED ๐ - GITSIGNS_
CHANGED ๐ - GITSIGNS_
FG ๐ - GITSIGNS_
REMOVED ๐ - GLOBAL_
BG ๐ - GLOBAL_
FG ๐ - NONE ๐
- NON_
TEXT_ ๐FG - TREESITTER_
CONTEXT_ ๐BG
Functionsยง
- decimal_
to_ ๐hex_ color - Formats an RGB integer as a
#RRGGBBhex string. - dict
- [
Dictionary] with colorscheme and highlight helpers. - get_hl ๐
- Retrieves [
GetHlInfos] (single or map) for given highlight options. - get_
hl_ ๐multiple - Retrieves multiple [
HighlightInfos] entries (map variant) for given highlight options. - get_
hl_ ๐single - Retrieves [
HighlightInfos] of a single group. - get_
overridden_ ๐hl_ opts - Retrieves the current highlight options for a given highlight group and applies overrides.
- set
- Sets the desired Neovim colorscheme and custom highlight groups.
- set_hl ๐
- Sets a highlight group in the specified namespace via Lua, bypassing the broken C FFI path.