diff options
| author | adamdottv <[email protected]> | 2025-04-30 11:05:59 -0500 |
|---|---|---|
| committer | adamdottv <[email protected]> | 2025-04-30 11:05:59 -0500 |
| commit | 91ae9b33d37df7a53bda958d787268ef0f917ffd (patch) | |
| tree | 27d1ceb87f30c666e20ebf6c7baeb8e1bd34693a /internal/config | |
| parent | a42175c067dd6b3e594d1e8de4f39a441bd9603b (diff) | |
| download | opencode-91ae9b33d37df7a53bda958d787268ef0f917ffd.tar.gz opencode-91ae9b33d37df7a53bda958d787268ef0f917ffd.zip | |
feat: custom themes
Diffstat (limited to 'internal/config')
| -rw-r--r-- | internal/config/config.go | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/internal/config/config.go b/internal/config/config.go index 8d6ad39d8..88f3a1838 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -68,7 +68,8 @@ type LSPConfig struct { // TUIConfig defines the configuration for the Terminal User Interface. type TUIConfig struct { - Theme string `json:"theme,omitempty"` + Theme string `json:"theme,omitempty"` + CustomTheme map[string]any `json:"customTheme,omitempty"` } // Config is the main configuration structure for the application. @@ -747,16 +748,16 @@ func UpdateTheme(themeName string) error { } // Parse the JSON - var configMap map[string]interface{} + var configMap map[string]any if err := json.Unmarshal(configData, &configMap); err != nil { return fmt.Errorf("failed to parse config file: %w", err) } // Update just the theme value - tuiConfig, ok := configMap["tui"].(map[string]interface{}) + tuiConfig, ok := configMap["tui"].(map[string]any) if !ok { // TUI config doesn't exist yet, create it - configMap["tui"] = map[string]interface{}{"theme": themeName} + configMap["tui"] = map[string]any{"theme": themeName} } else { // Update existing TUI config tuiConfig["theme"] = themeName |
