summaryrefslogtreecommitdiffhomepage
path: root/packages/tui/internal/theme/manager.go
diff options
context:
space:
mode:
authoradamdottv <[email protected]>2025-06-13 06:49:59 -0500
committeradamdottv <[email protected]>2025-06-13 06:49:59 -0500
commit1b8cfe9e99e7b97069580a2e8aaa8cf1abb56d31 (patch)
treec701adcb2ac2b097bfd18d05804e68a144b17b54 /packages/tui/internal/theme/manager.go
parent97837d2d23195942dbbb15f3c5ed749b1af688aa (diff)
downloadopencode-1b8cfe9e99e7b97069580a2e8aaa8cf1abb56d31.tar.gz
opencode-1b8cfe9e99e7b97069580a2e8aaa8cf1abb56d31.zip
wip: refactoring tui
Diffstat (limited to 'packages/tui/internal/theme/manager.go')
-rw-r--r--packages/tui/internal/theme/manager.go19
1 files changed, 3 insertions, 16 deletions
diff --git a/packages/tui/internal/theme/manager.go b/packages/tui/internal/theme/manager.go
index 3e351f7f1..c54ed1119 100644
--- a/packages/tui/internal/theme/manager.go
+++ b/packages/tui/internal/theme/manager.go
@@ -6,6 +6,8 @@ import (
"slices"
"strings"
"sync"
+
+ "github.com/alecthomas/chroma/v2/styles"
// "github.com/alecthomas/chroma/v2/styles"
)
@@ -45,22 +47,7 @@ func RegisterTheme(name string, theme Theme) {
func SetTheme(name string) error {
globalManager.mu.Lock()
defer globalManager.mu.Unlock()
- // delete(styles.Registry, "charm")
-
- // Handle custom theme
- // if name == "custom" {
- // cfg := config.Get()
- // if cfg == nil || cfg.TUI.CustomTheme == nil || len(cfg.TUI.CustomTheme) == 0 {
- // return fmt.Errorf("custom theme selected but no custom theme colors defined in config")
- // }
- //
- // customTheme, err := LoadCustomTheme(cfg.TUI.CustomTheme)
- // if err != nil {
- // return fmt.Errorf("failed to load custom theme: %w", err)
- // }
- //
- // // Register the custom theme
- // globalManager.themes["custom"] = customTheme
+ delete(styles.Registry, "charm")
if _, exists := globalManager.themes[name]; !exists {
return fmt.Errorf("theme '%s' not found", name)