LoadTheme loads a theme by reference with mtime-aware caching. If ref is "" (empty), this is an error - caller should resolve to DefaultThemeRef first. Refs starting with "user:" (e.g., "user:nord") explicitly load from user themes directory. Other refs load built-in themes first, falling back to u
(ref string)
| 559 | // The cache is mtime-aware: user themes are re-parsed only when the file's modTime changes. |
| 560 | // If a user theme file exists but fails to parse, an error is returned (no silent fallback). |
| 561 | func LoadTheme(ref string) (*Theme, error) { |
| 562 | return defaultRegistry.Load().LoadTheme(ref) |
| 563 | } |
| 564 | |
| 565 | func (r *themeRegistry) LoadTheme(ref string) (*Theme, error) { |
| 566 | // Empty ref means "use default theme" - caller should resolve this to DefaultThemeRef |