smelt.theme¶
Tier: UiHost — Requires a terminal UI; calling these from headless mode raises.
Apply, read, and override the active colorscheme. Highlight groups follow nvim's PascalCase convention (Comment, SmeltAccent, …). The full colorscheme is described by a ThemeSpec table whose groups map keys are highlight-group names and whose values are either a StyleDecl table or a string referencing another group in the spec. UiHost-only.
smelt.theme.apply¶
Types: smelt.theme.ThemeSpec
Compile spec against the current light/dark setting and install it as the active theme. String-valued group entries are resolved at compile time; cycles and dangling references raise a runtime error.
smelt.theme.get¶
Read the resolved StyleDecl for group. Unknown groups resolve to an empty table.
smelt.theme.is_light¶
Return true if the active theme is a light theme. Lets plugins flip glyphs or contrast levels based on the current palette.
smelt.theme.set¶
Types: smelt.theme.StyleDecl
Override a single highlight group's style. style is a StyleDecl table ({ fg = { ansi = 244 }, bold = true }). The override sticks until the next apply() or use() call.
smelt.theme.snapshot¶
Snapshot every group currently set on the active theme into a { group = StyleDecl } table.
smelt.theme.use¶
Load colorscheme name from runtime/lua/smelt/colorschemes/<name>.lua
and apply it. The file must return a ThemeSpec table: a groups
map keyed by highlight-group name with either a StyleDecl table or
a string reference as its value (see smelt.theme.apply). Drop
custom colorschemes alongside default.lua.