Skip to main content

Module loader

Module loader 

Source
Expand description

Free-function loader API for Theme.

Wraps Theme::from_toml_str / Theme::from_path as top-level functions so callers can write hjkl_theme::loader::load_from_path(p)? without importing the Theme struct, and provides default_theme() with a minimal bundled dark palette.

resolve_palette_refs is exposed here for symmetry, but resolution happens automatically inside parse_toml / load_from_path; callers that build a Theme via those functions get fully-resolved colors with no additional step required.

Functionsยง

default_theme
Return the bundled default dark Theme.
load_from_path
Read a TOML file from path and return a fully-resolved Theme.
parse_toml
Parse a TOML string into a fully-resolved Theme.
resolve_palette_refs
Walk a Theme and verify all palette references are resolved.