Skip to main content

ensure_theme_keys_present

Function ensure_theme_keys_present 

Source
pub fn ensure_theme_keys_present()
Expand description

What: Ensure theme.conf (or legacy theme file) defines every required theme key, appending skeleton defaults for any gaps.

Inputs:

  • None.

Output:

  • None.

Details:

  • Resolves the same path as theme loading (resolve_theme_config_path or config_dir()/theme.conf).
  • Writes the full theme skeleton when the file is missing or empty.
  • Otherwise appends key = value lines from THEME_SKELETON_CONTENT for each missing canonical color.
  • Must run before the first theme() load so incomplete files are repaired on disk first.