on main help sign in
remove old theme
e359209Kujtim Hoxha
internal/app/app.go−20
@@ -19,7 +19,6 @@ import (
19 "github.com/opencode-ai/opencode/internal/message"
19 "github.com/opencode-ai/opencode/internal/message"
20 "github.com/opencode-ai/opencode/internal/permission"
20 "github.com/opencode-ai/opencode/internal/permission"
21 "github.com/opencode-ai/opencode/internal/session"
21 "github.com/opencode-ai/opencode/internal/session"
22− "github.com/opencode-ai/opencode/internal/tui/theme"
23)
22)
24
23
25type App struct {
24type App struct {
@@ -53,9 +52,6 @@ func New(ctx context.Context, conn *sql.DB) (*App, error) {
53 LSPClients: make(map[string]*lsp.Client),
52 LSPClients: make(map[string]*lsp.Client),
54 }
53 }
55
54
56− // Initialize theme based on configuration
57− app.initTheme()
58−
59 // Initialize LSP clients in the background
55 // Initialize LSP clients in the background
60 go app.initLSPClients(ctx)
56 go app.initLSPClients(ctx)
61
57
@@ -80,22 +76,6 @@ func New(ctx context.Context, conn *sql.DB) (*App, error) {
80 return app, nil
76 return app, nil
81}
77}
82
78
83−// initTheme sets the application theme based on the configuration
84−func (app *App) initTheme() {
85− cfg := config.Get()
86− if cfg == nil || cfg.TUI.Theme == "" {
87− return // Use default theme
88− }
89−
90− // Try to set the theme from config
91− err := theme.SetTheme(cfg.TUI.Theme)
92− if err != nil {
93− logging.Warn("Failed to set theme from config, using default theme", "theme", cfg.TUI.Theme, "error", err)
94− } else {
95− logging.Debug("Set theme from config", "theme", cfg.TUI.Theme)
96− }
97−}
98−
99// RunNonInteractive handles the execution flow when a prompt is provided via CLI flag.
79// RunNonInteractive handles the execution flow when a prompt is provided via CLI flag.
100func (a *App) RunNonInteractive(ctx context.Context, prompt string, outputFormat string, quiet bool) error {
80func (a *App) RunNonInteractive(ctx context.Context, prompt string, outputFormat string, quiet bool) error {
101 logging.Info("Running in non-interactive mode")
81 logging.Info("Running in non-interactive mode")
internal/tui/components/dialog/permission.go+3−3
@@ -157,17 +157,17 @@ func (p *permissionDialogCmp) renderButtons() string {
157 // Style the selected button
157 // Style the selected button
158 switch p.selectedOption {
158 switch p.selectedOption {
159 case 0:
159 case 0:
160− allowStyle = allowStyle.Background(t.Primary)
160+ allowStyle = allowStyle.Background(t.Secondary)
161 allowSessionStyle = allowSessionStyle.Background(t.BgSubtle)
161 allowSessionStyle = allowSessionStyle.Background(t.BgSubtle)
162 denyStyle = denyStyle.Background(t.BgSubtle)
162 denyStyle = denyStyle.Background(t.BgSubtle)
163 case 1:
163 case 1:
164 allowStyle = allowStyle.Background(t.BgSubtle)
164 allowStyle = allowStyle.Background(t.BgSubtle)
165− allowSessionStyle = allowSessionStyle.Background(t.Primary)
165+ allowSessionStyle = allowSessionStyle.Background(t.Secondary)
166 denyStyle = denyStyle.Background(t.BgSubtle)
166 denyStyle = denyStyle.Background(t.BgSubtle)
167 case 2:
167 case 2:
168 allowStyle = allowStyle.Background(t.BgSubtle)
168 allowStyle = allowStyle.Background(t.BgSubtle)
169 allowSessionStyle = allowSessionStyle.Background(t.BgSubtle)
169 allowSessionStyle = allowSessionStyle.Background(t.BgSubtle)
170− denyStyle = denyStyle.Background(t.Primary)
170+ denyStyle = denyStyle.Background(t.Secondary)
171 }
171 }
172
172
173 allowButton := allowStyle.Padding(0, 1).Render("Allow (a)")
173 allowButton := allowStyle.Padding(0, 1).Render("Allow (a)")
internal/tui/components/dialogs/quit/quit.go+4−4
@@ -74,15 +74,15 @@ func (q *quitDialogCmp) View() tea.View {
74 noStyle := yesStyle
74 noStyle := yesStyle
75
75
76 if q.selectedNo {
76 if q.selectedNo {
77− noStyle = noStyle.Background(t.Primary)
77+ noStyle = noStyle.Background(t.Secondary)
78 yesStyle = yesStyle.Background(t.BgSubtle)
78 yesStyle = yesStyle.Background(t.BgSubtle)
79 } else {
79 } else {
80− yesStyle = yesStyle.Background(t.Primary)
80+ yesStyle = yesStyle.Background(t.Secondary)
81 noStyle = noStyle.Background(t.BgSubtle)
81 noStyle = noStyle.Background(t.BgSubtle)
82 }
82 }
83
83
84− yesButton := yesStyle.Padding(0, 1).Render("Yes")
84+ yesButton := yesStyle.Padding(0, 1).Render("Yep!")
85− noButton := noStyle.Padding(0, 1).Render("No")
85+ noButton := noStyle.Padding(0, 1).Render("Nope")
86
86
87 buttons := baseStyle.Width(lipgloss.Width(question)).Align(lipgloss.Right).Render(
87 buttons := baseStyle.Width(lipgloss.Width(question)).Align(lipgloss.Right).Render(
88 lipgloss.JoinHorizontal(lipgloss.Center, yesButton, " ", noButton),
88 lipgloss.JoinHorizontal(lipgloss.Center, yesButton, " ", noButton),
internal/tui/components/logs/details.go+14−14
@@ -11,7 +11,7 @@ import (
11 "github.com/charmbracelet/lipgloss/v2"
11 "github.com/charmbracelet/lipgloss/v2"
12 "github.com/opencode-ai/opencode/internal/logging"
12 "github.com/opencode-ai/opencode/internal/logging"
13 "github.com/opencode-ai/opencode/internal/tui/layout"
13 "github.com/opencode-ai/opencode/internal/tui/layout"
14− "github.com/opencode-ai/opencode/internal/tui/theme"
14+ "github.com/opencode-ai/opencode/internal/tui/styles"
15 "github.com/opencode-ai/opencode/internal/tui/util"
15 "github.com/opencode-ai/opencode/internal/tui/util"
16)
16)
17
17
@@ -50,10 +50,10 @@ func (i *detailCmp) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
50
50
51func (i *detailCmp) updateContent() {
51func (i *detailCmp) updateContent() {
52 var content strings.Builder
52 var content strings.Builder
53− t := theme.CurrentTheme()
53+ t := styles.CurrentTheme()
54
54
55 // Format the header with timestamp and level
55 // Format the header with timestamp and level
56− timeStyle := lipgloss.NewStyle().Foreground(t.TextMuted())
56+ timeStyle := t.S().Muted
57 levelStyle := getLevelStyle(i.currentLog.Level)
57 levelStyle := getLevelStyle(i.currentLog.Level)
58
58
59 header := lipgloss.JoinHorizontal(
59 header := lipgloss.JoinHorizontal(
@@ -67,7 +67,7 @@ func (i *detailCmp) updateContent() {
67 content.WriteString("\n\n")
67 content.WriteString("\n\n")
68
68
69 // Message with styling
69 // Message with styling
70− messageStyle := lipgloss.NewStyle().Bold(true).Foreground(t.Text())
70+ messageStyle := t.S().Text.Bold(true)
71 content.WriteString(messageStyle.Render("Message:"))
71 content.WriteString(messageStyle.Render("Message:"))
72 content.WriteString("\n")
72 content.WriteString("\n")
73 content.WriteString(lipgloss.NewStyle().Padding(0, 2).Render(i.currentLog.Message))
73 content.WriteString(lipgloss.NewStyle().Padding(0, 2).Render(i.currentLog.Message))
@@ -75,13 +75,13 @@ func (i *detailCmp) updateContent() {
75
75
76 // Attributes section
76 // Attributes section
77 if len(i.currentLog.Attributes) > 0 {
77 if len(i.currentLog.Attributes) > 0 {
78− attrHeaderStyle := lipgloss.NewStyle().Bold(true).Foreground(t.Text())
78+ attrHeaderStyle := t.S().Text.Bold(true)
79 content.WriteString(attrHeaderStyle.Render("Attributes:"))
79 content.WriteString(attrHeaderStyle.Render("Attributes:"))
80 content.WriteString("\n")
80 content.WriteString("\n")
81
81
82 // Create a table-like display for attributes
82 // Create a table-like display for attributes
83− keyStyle := lipgloss.NewStyle().Foreground(t.Primary()).Bold(true)
83+ keyStyle := t.S().Base.Foreground(t.Primary).Bold(true)
84− valueStyle := lipgloss.NewStyle().Foreground(t.Text())
84+ valueStyle := t.S().Text
85
85
86 for _, attr := range i.currentLog.Attributes {
86 for _, attr := range i.currentLog.Attributes {
87 attrLine := fmt.Sprintf("%s: %s",
87 attrLine := fmt.Sprintf("%s: %s",
@@ -97,20 +97,20 @@ func (i *detailCmp) updateContent() {
97}
97}
98
98
99func getLevelStyle(level string) lipgloss.Style {
99func getLevelStyle(level string) lipgloss.Style {
100+ t := styles.CurrentTheme()
100− style := lipgloss.NewStyle().Bold(true)
101+ style := t.S().Base.Bold(true)
101− t := theme.CurrentTheme()
102
102
103 switch strings.ToLower(level) {
103 switch strings.ToLower(level) {
104 case "info":
104 case "info":
105− return style.Foreground(t.Info())
105+ return style.Foreground(t.Info)
106 case "warn", "warning":
106 case "warn", "warning":
107− return style.Foreground(t.Warning())
107+ return style.Foreground(t.Warning)
108 case "error", "err":
108 case "error", "err":
109− return style.Foreground(t.Error())
109+ return style.Foreground(t.Error)
110 case "debug":
110 case "debug":
111− return style.Foreground(t.Success())
111+ return style.Foreground(t.Success)
112 default:
112 default:
113− return style.Foreground(t.Text())
113+ return style.Foreground(t.FgBase)
114 }
114 }
115}
115}
116
116
internal/tui/components/logs/table.go+3−3
@@ -10,7 +10,7 @@ import (
10 "github.com/opencode-ai/opencode/internal/logging"
10 "github.com/opencode-ai/opencode/internal/logging"
11 "github.com/opencode-ai/opencode/internal/pubsub"
11 "github.com/opencode-ai/opencode/internal/pubsub"
12 "github.com/opencode-ai/opencode/internal/tui/layout"
12 "github.com/opencode-ai/opencode/internal/tui/layout"
13− "github.com/opencode-ai/opencode/internal/tui/theme"
13+ "github.com/opencode-ai/opencode/internal/tui/styles"
14 "github.com/opencode-ai/opencode/internal/tui/util"
14 "github.com/opencode-ai/opencode/internal/tui/util"
15)
15)
16
16
@@ -61,9 +61,9 @@ func (i *tableCmp) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
61}
61}
62
62
63func (i *tableCmp) View() tea.View {
63func (i *tableCmp) View() tea.View {
64− t := theme.CurrentTheme()
64+ t := styles.CurrentTheme()
65 defaultStyles := table.DefaultStyles()
65 defaultStyles := table.DefaultStyles()
66− defaultStyles.Selected = defaultStyles.Selected.Foreground(t.Primary())
66+ defaultStyles.Selected = defaultStyles.Selected.Foreground(t.Primary)
67 i.table.SetStyles(defaultStyles)
67 i.table.SetStyles(defaultStyles)
68 return tea.NewView(i.table.View())
68 return tea.NewView(i.table.View())
69}
69}
internal/tui/theme/catppuccin.godeleted−172
@@ -1,172 +0,0 @@
1−package theme
2−
3−import (
4− catppuccin "github.com/catppuccin/go"
5− "github.com/charmbracelet/lipgloss/v2"
6−)
7−
8−// CatppuccinTheme implements the Theme interface with Catppuccin colors.
9−// It provides both dark (Mocha) and light (Latte) variants.
10−type CatppuccinTheme struct {
11− BaseTheme
12−}
13−
14−// NewCatppuccinMochaTheme creates a new instance of the Catppuccin Mocha theme.
15−func NewCatppuccinMochaTheme() *CatppuccinTheme {
16− // Get the Catppuccin palette
17− mocha := catppuccin.Mocha
18−
19− theme := &CatppuccinTheme{}
20−
21− // Base colors
22− theme.PrimaryColor = lipgloss.Color(mocha.Blue().Hex)
23− theme.SecondaryColor = lipgloss.Color(mocha.Mauve().Hex)
24− theme.AccentColor = lipgloss.Color(mocha.Peach().Hex)
25−
26− // Status colors
27− theme.ErrorColor = lipgloss.Color(mocha.Red().Hex)
28− theme.WarningColor = lipgloss.Color(mocha.Peach().Hex)
29− theme.SuccessColor = lipgloss.Color(mocha.Green().Hex)
30− theme.InfoColor = lipgloss.Color(mocha.Blue().Hex)
31−
32− // Text colors
33− theme.TextColor = lipgloss.Color(mocha.Text().Hex)
34− theme.TextMutedColor = lipgloss.Color(mocha.Subtext0().Hex)
35− theme.TextEmphasizedColor = lipgloss.Color(mocha.Lavender().Hex)
36−
37− // Background colors
38− theme.BackgroundColor = lipgloss.Color("#212121") // From existing styles
39− theme.BackgroundSecondaryColor = lipgloss.Color("#2c2c2c") // From existing styles
40− theme.BackgroundDarkerColor = lipgloss.Color("#181818") // From existing styles
41−
42− // Border colors
43− theme.BorderNormalColor = lipgloss.Color("#4b4c5c") // From existing styles
44− theme.BorderFocusedColor = lipgloss.Color(mocha.Blue().Hex)
45− theme.BorderDimColor = lipgloss.Color(mocha.Surface0().Hex)
46−
47− // Diff view colors
48− theme.DiffAddedColor = lipgloss.Color("#478247") // From existing diff.go
49− theme.DiffRemovedColor = lipgloss.Color("#7C4444") // From existing diff.go
50− theme.DiffContextColor = lipgloss.Color("#a0a0a0") // From existing diff.go
51− theme.DiffHunkHeaderColor = lipgloss.Color("#a0a0a0") // From existing diff.go
52− theme.DiffHighlightAddedColor = lipgloss.Color("#DAFADA") // From existing diff.go
53− theme.DiffHighlightRemovedColor = lipgloss.Color("#FADADD") // From existing diff.go
54− theme.DiffAddedBgColor = lipgloss.Color("#303A30") // From existing diff.go
55− theme.DiffRemovedBgColor = lipgloss.Color("#3A3030") // From existing diff.go
56− theme.DiffContextBgColor = lipgloss.Color("#212121") // From existing diff.go
57− theme.DiffLineNumberColor = lipgloss.Color("#888888") // From existing diff.go
58− theme.DiffAddedLineNumberBgColor = lipgloss.Color("#293229") // From existing diff.go
59− theme.DiffRemovedLineNumberBgColor = lipgloss.Color("#332929") // From existing diff.go
60−
61− // Markdown colors
62− theme.MarkdownTextColor = lipgloss.Color(mocha.Text().Hex)
63− theme.MarkdownHeadingColor = lipgloss.Color(mocha.Mauve().Hex)
64− theme.MarkdownLinkColor = lipgloss.Color(mocha.Sky().Hex)
65− theme.MarkdownLinkTextColor = lipgloss.Color(mocha.Pink().Hex)
66− theme.MarkdownCodeColor = lipgloss.Color(mocha.Green().Hex)
67− theme.MarkdownBlockQuoteColor = lipgloss.Color(mocha.Yellow().Hex)
68− theme.MarkdownEmphColor = lipgloss.Color(mocha.Yellow().Hex)
69− theme.MarkdownStrongColor = lipgloss.Color(mocha.Peach().Hex)
70− theme.MarkdownHorizontalRuleColor = lipgloss.Color(mocha.Overlay0().Hex)
71− theme.MarkdownListItemColor = lipgloss.Color(mocha.Blue().Hex)
72− theme.MarkdownListEnumerationColor = lipgloss.Color(mocha.Sky().Hex)
73− theme.MarkdownImageColor = lipgloss.Color(mocha.Sapphire().Hex)
74− theme.MarkdownImageTextColor = lipgloss.Color(mocha.Pink().Hex)
75− theme.MarkdownCodeBlockColor = lipgloss.Color(mocha.Text().Hex)
76−
77− // Syntax highlighting colors
78− theme.SyntaxCommentColor = lipgloss.Color(mocha.Overlay1().Hex)
79− theme.SyntaxKeywordColor = lipgloss.Color(mocha.Pink().Hex)
80− theme.SyntaxFunctionColor = lipgloss.Color(mocha.Green().Hex)
81− theme.SyntaxVariableColor = lipgloss.Color(mocha.Sky().Hex)
82− theme.SyntaxStringColor = lipgloss.Color(mocha.Yellow().Hex)
83− theme.SyntaxNumberColor = lipgloss.Color(mocha.Teal().Hex)
84− theme.SyntaxTypeColor = lipgloss.Color(mocha.Sky().Hex)
85− theme.SyntaxOperatorColor = lipgloss.Color(mocha.Pink().Hex)
86− theme.SyntaxPunctuationColor = lipgloss.Color(mocha.Text().Hex)
87−
88− return theme
89−}
90−
91−// NewCatppuccinLatteTheme creates a new instance of the Catppuccin Latte theme.
92−func NewCatppuccinLatteTheme() *CatppuccinTheme {
93− // Get the Catppuccin palette
94− latte := catppuccin.Latte
95−
96− theme := &CatppuccinTheme{}
97−
98− // Base colors
99− theme.PrimaryColor = lipgloss.Color(latte.Blue().Hex)
100− theme.SecondaryColor = lipgloss.Color(latte.Mauve().Hex)
101− theme.AccentColor = lipgloss.Color(latte.Peach().Hex)
102−
103− // Status colors
104− theme.ErrorColor = lipgloss.Color(latte.Red().Hex)
105− theme.WarningColor = lipgloss.Color(latte.Peach().Hex)
106− theme.SuccessColor = lipgloss.Color(latte.Green().Hex)
107− theme.InfoColor = lipgloss.Color(latte.Blue().Hex)
108−
109− // Text colors
110− theme.TextColor = lipgloss.Color(latte.Text().Hex)
111− theme.TextMutedColor = lipgloss.Color(latte.Subtext0().Hex)
112− theme.TextEmphasizedColor = lipgloss.Color(latte.Lavender().Hex)
113−
114− // Background colors
115− theme.BackgroundColor = lipgloss.Color("#EEEEEE") // Light equivalent
116− theme.BackgroundSecondaryColor = lipgloss.Color("#E0E0E0") // Light equivalent
117− theme.BackgroundDarkerColor = lipgloss.Color("#F5F5F5") // Light equivalent
118−
119− // Border colors
120− theme.BorderNormalColor = lipgloss.Color("#BDBDBD") // Light equivalent
121− theme.BorderFocusedColor = lipgloss.Color(latte.Blue().Hex)
122− theme.BorderDimColor = lipgloss.Color(latte.Surface0().Hex)
123−
124− // Diff view colors
125− theme.DiffAddedColor = lipgloss.Color("#2E7D32") // Light equivalent
126− theme.DiffRemovedColor = lipgloss.Color("#C62828") // Light equivalent
127− theme.DiffContextColor = lipgloss.Color("#757575") // Light equivalent
128− theme.DiffHunkHeaderColor = lipgloss.Color("#757575") // Light equivalent
129− theme.DiffHighlightAddedColor = lipgloss.Color("#A5D6A7") // Light equivalent
130− theme.DiffHighlightRemovedColor = lipgloss.Color("#EF9A9A") // Light equivalent
131− theme.DiffAddedBgColor = lipgloss.Color("#E8F5E9") // Light equivalent
132− theme.DiffRemovedBgColor = lipgloss.Color("#FFEBEE") // Light equivalent
133− theme.DiffContextBgColor = lipgloss.Color("#F5F5F5") // Light equivalent
134− theme.DiffLineNumberColor = lipgloss.Color("#9E9E9E") // Light equivalent
135− theme.DiffAddedLineNumberBgColor = lipgloss.Color("#C8E6C9") // Light equivalent
136− theme.DiffRemovedLineNumberBgColor = lipgloss.Color("#FFCDD2") // Light equivalent
137−
138− // Markdown colors
139− theme.MarkdownTextColor = lipgloss.Color(latte.Text().Hex)
140− theme.MarkdownHeadingColor = lipgloss.Color(latte.Mauve().Hex)
141− theme.MarkdownLinkColor = lipgloss.Color(latte.Sky().Hex)
142− theme.MarkdownLinkTextColor = lipgloss.Color(latte.Pink().Hex)
143− theme.MarkdownCodeColor = lipgloss.Color(latte.Green().Hex)
144− theme.MarkdownBlockQuoteColor = lipgloss.Color(latte.Yellow().Hex)
145− theme.MarkdownEmphColor = lipgloss.Color(latte.Yellow().Hex)
146− theme.MarkdownStrongColor = lipgloss.Color(latte.Peach().Hex)
147− theme.MarkdownHorizontalRuleColor = lipgloss.Color(latte.Overlay0().Hex)
148− theme.MarkdownListItemColor = lipgloss.Color(latte.Blue().Hex)
149− theme.MarkdownListEnumerationColor = lipgloss.Color(latte.Sky().Hex)
150− theme.MarkdownImageColor = lipgloss.Color(latte.Sapphire().Hex)
151− theme.MarkdownImageTextColor = lipgloss.Color(latte.Pink().Hex)
152− theme.MarkdownCodeBlockColor = lipgloss.Color(latte.Text().Hex)
153−
154− // Syntax highlighting colors
155− theme.SyntaxCommentColor = lipgloss.Color(latte.Overlay1().Hex)
156− theme.SyntaxKeywordColor = lipgloss.Color(latte.Pink().Hex)
157− theme.SyntaxFunctionColor = lipgloss.Color(latte.Green().Hex)
158− theme.SyntaxVariableColor = lipgloss.Color(latte.Sky().Hex)
159− theme.SyntaxStringColor = lipgloss.Color(latte.Yellow().Hex)
160− theme.SyntaxNumberColor = lipgloss.Color(latte.Teal().Hex)
161− theme.SyntaxTypeColor = lipgloss.Color(latte.Sky().Hex)
162− theme.SyntaxOperatorColor = lipgloss.Color(latte.Pink().Hex)
163− theme.SyntaxPunctuationColor = lipgloss.Color(latte.Text().Hex)
164−
165− return theme
166−}
167−
168−func init() {
169− // Register the Catppuccin themes with the theme manager
170− RegisterTheme("catppuccin-mocha", NewCatppuccinMochaTheme())
171− RegisterTheme("catppuccin-latte", NewCatppuccinLatteTheme())
172−}
internal/tui/theme/dracula.godeleted−106
@@ -1,106 +0,0 @@
1−package theme
2−
3−import (
4− "github.com/charmbracelet/lipgloss/v2"
5−)
6−
7−// DraculaTheme implements the Theme interface with Dracula colors.
8−// It provides both dark and light variants, though Dracula is primarily a dark theme.
9−type DraculaTheme struct {
10− BaseTheme
11−}
12−
13−// NewDraculaTheme creates a new instance of the Dracula theme.
14−func NewDraculaTheme() *DraculaTheme {
15− // Dracula color palette
16− // Official colors from https://draculatheme.com/
17− darkBackground := "#282a36"
18− darkCurrentLine := "#44475a"
19− darkSelection := "#44475a"
20− darkForeground := "#f8f8f2"
21− darkComment := "#6272a4"
22− darkCyan := "#8be9fd"
23− darkGreen := "#50fa7b"
24− darkOrange := "#ffb86c"
25− darkPink := "#ff79c6"
26− darkPurple := "#bd93f9"
27− darkRed := "#ff5555"
28− darkYellow := "#f1fa8c"
29− darkBorder := "#44475a"
30−
31− theme := &DraculaTheme{}
32−
33− // Base colors
34− theme.PrimaryColor = lipgloss.Color(darkPurple)
35− theme.SecondaryColor = lipgloss.Color(darkPink)
36− theme.AccentColor = lipgloss.Color(darkCyan)
37−
38− // Status colors
39− theme.ErrorColor = lipgloss.Color(darkRed)
40− theme.WarningColor = lipgloss.Color(darkOrange)
41− theme.SuccessColor = lipgloss.Color(darkGreen)
42− theme.InfoColor = lipgloss.Color(darkCyan)
43−
44− // Text colors
45− theme.TextColor = lipgloss.Color(darkForeground)
46− theme.TextMutedColor = lipgloss.Color(darkComment)
47− theme.TextEmphasizedColor = lipgloss.Color(darkYellow)
48−
49− // Background colors
50− theme.BackgroundColor = lipgloss.Color(darkBackground)
51− theme.BackgroundSecondaryColor = lipgloss.Color(darkCurrentLine)
52− theme.BackgroundDarkerColor = lipgloss.Color("#21222c") // Slightly darker than background
53−
54− // Border colors
55− theme.BorderNormalColor = lipgloss.Color(darkBorder)
56− theme.BorderFocusedColor = lipgloss.Color(darkPurple)
57− theme.BorderDimColor = lipgloss.Color(darkSelection)
58−
59− // Diff view colors
60− theme.DiffAddedColor = lipgloss.Color(darkGreen)
61− theme.DiffRemovedColor = lipgloss.Color(darkRed)
62− theme.DiffContextColor = lipgloss.Color(darkComment)
63− theme.DiffHunkHeaderColor = lipgloss.Color(darkPurple)
64− theme.DiffHighlightAddedColor = lipgloss.Color("#50fa7b")
65− theme.DiffHighlightRemovedColor = lipgloss.Color("#ff5555")
66− theme.DiffAddedBgColor = lipgloss.Color("#2c3b2c")
67− theme.DiffRemovedBgColor = lipgloss.Color("#3b2c2c")
68− theme.DiffContextBgColor = lipgloss.Color(darkBackground)
69− theme.DiffLineNumberColor = lipgloss.Color(darkComment)
70− theme.DiffAddedLineNumberBgColor = lipgloss.Color("#253025")
71− theme.DiffRemovedLineNumberBgColor = lipgloss.Color("#302525")
72−
73− // Markdown colors
74− theme.MarkdownTextColor = lipgloss.Color(darkForeground)
75− theme.MarkdownHeadingColor = lipgloss.Color(darkPink)
76− theme.MarkdownLinkColor = lipgloss.Color(darkPurple)
77− theme.MarkdownLinkTextColor = lipgloss.Color(darkCyan)
78− theme.MarkdownCodeColor = lipgloss.Color(darkGreen)
79− theme.MarkdownBlockQuoteColor = lipgloss.Color(darkYellow)
80− theme.MarkdownEmphColor = lipgloss.Color(darkYellow)
81− theme.MarkdownStrongColor = lipgloss.Color(darkOrange)
82− theme.MarkdownHorizontalRuleColor = lipgloss.Color(darkComment)
83− theme.MarkdownListItemColor = lipgloss.Color(darkPurple)
84− theme.MarkdownListEnumerationColor = lipgloss.Color(darkCyan)
85− theme.MarkdownImageColor = lipgloss.Color(darkPurple)
86− theme.MarkdownImageTextColor = lipgloss.Color(darkCyan)
87− theme.MarkdownCodeBlockColor = lipgloss.Color(darkForeground)
88−
89− // Syntax highlighting colors
90− theme.SyntaxCommentColor = lipgloss.Color(darkComment)
91− theme.SyntaxKeywordColor = lipgloss.Color(darkPink)
92− theme.SyntaxFunctionColor = lipgloss.Color(darkGreen)
93− theme.SyntaxVariableColor = lipgloss.Color(darkOrange)
94− theme.SyntaxStringColor = lipgloss.Color(darkYellow)
95− theme.SyntaxNumberColor = lipgloss.Color(darkPurple)
96− theme.SyntaxTypeColor = lipgloss.Color(darkCyan)
97− theme.SyntaxOperatorColor = lipgloss.Color(darkPink)
98− theme.SyntaxPunctuationColor = lipgloss.Color(darkForeground)
99−
100− return theme
101−}
102−
103−func init() {
104− // Register the Dracula theme with the theme manager
105− RegisterTheme("dracula", NewDraculaTheme())
106−}
internal/tui/theme/flexoki.godeleted−204
@@ -1,204 +0,0 @@
1−package theme
2−
3−import (
4− "github.com/charmbracelet/lipgloss/v2"
5−)
6−
7−// Flexoki color palette constants
8−const (
9− // Base colors
10− flexokiPaper = "#FFFCF0" // Paper (lightest)
11− flexokiBase50 = "#F2F0E5" // bg-2 (light)
12− flexokiBase100 = "#E6E4D9" // ui (light)
13− flexokiBase150 = "#DAD8CE" // ui-2 (light)
14− flexokiBase200 = "#CECDC3" // ui-3 (light)
15− flexokiBase300 = "#B7B5AC" // tx-3 (light)
16− flexokiBase500 = "#878580" // tx-2 (light)
17− flexokiBase600 = "#6F6E69" // tx (light)
18− flexokiBase700 = "#575653" // tx-3 (dark)
19− flexokiBase800 = "#403E3C" // ui-3 (dark)
20− flexokiBase850 = "#343331" // ui-2 (dark)
21− flexokiBase900 = "#282726" // ui (dark)
22− flexokiBase950 = "#1C1B1A" // bg-2 (dark)
23− flexokiBlack = "#100F0F" // bg (darkest)
24−
25− // Accent colors - Light theme (600)
26− flexokiRed600 = "#AF3029"
27− flexokiOrange600 = "#BC5215"
28− flexokiYellow600 = "#AD8301"
29− flexokiGreen600 = "#66800B"
30− flexokiCyan600 = "#24837B"
31− flexokiBlue600 = "#205EA6"
32− flexokiPurple600 = "#5E409D"
33− flexokiMagenta600 = "#A02F6F"
34−
35− // Accent colors - Dark theme (400)
36− flexokiRed400 = "#D14D41"
37− flexokiOrange400 = "#DA702C"
38− flexokiYellow400 = "#D0A215"
39− flexokiGreen400 = "#879A39"
40− flexokiCyan400 = "#3AA99F"
41− flexokiBlue400 = "#4385BE"
42− flexokiPurple400 = "#8B7EC8"
43− flexokiMagenta400 = "#CE5D97"
44−)
45−
46−// FlexokiTheme implements the Theme interface with Flexoki colors.
47−// It provides both dark and light variants.
48−type FlexokiTheme struct {
49− BaseTheme
50−}
51−
52−// NewFlexokiDarkTheme creates a new instance of the Flexoki Dark theme.
53−func NewFlexokiDarkTheme() *FlexokiTheme {
54− theme := &FlexokiTheme{}
55−
56− // Base colors
57− theme.PrimaryColor = lipgloss.Color(flexokiBlue400)
58− theme.SecondaryColor = lipgloss.Color(flexokiPurple400)
59− theme.AccentColor = lipgloss.Color(flexokiOrange400)
60−
61− // Status colors
62− theme.ErrorColor = lipgloss.Color(flexokiRed400)
63− theme.WarningColor = lipgloss.Color(flexokiYellow400)
64− theme.SuccessColor = lipgloss.Color(flexokiGreen400)
65− theme.InfoColor = lipgloss.Color(flexokiCyan400)
66−
67− // Text colors
68− theme.TextColor = lipgloss.Color(flexokiBase300)
69− theme.TextMutedColor = lipgloss.Color(flexokiBase700)
70− theme.TextEmphasizedColor = lipgloss.Color(flexokiYellow400)
71−
72− // Background colors
73− theme.BackgroundColor = lipgloss.Color(flexokiBlack)
74− theme.BackgroundSecondaryColor = lipgloss.Color(flexokiBase950)
75− theme.BackgroundDarkerColor = lipgloss.Color(flexokiBase900)
76−
77− // Border colors
78− theme.BorderNormalColor = lipgloss.Color(flexokiBase900)
79− theme.BorderFocusedColor = lipgloss.Color(flexokiBlue400)
80− theme.BorderDimColor = lipgloss.Color(flexokiBase850)
81−
82− // Diff view colors
83− theme.DiffAddedColor = lipgloss.Color(flexokiGreen400)
84− theme.DiffRemovedColor = lipgloss.Color(flexokiRed400)
85− theme.DiffContextColor = lipgloss.Color(flexokiBase700)
86− theme.DiffHunkHeaderColor = lipgloss.Color(flexokiBase700)
87− theme.DiffHighlightAddedColor = lipgloss.Color(flexokiGreen400)
88− theme.DiffHighlightRemovedColor = lipgloss.Color(flexokiRed400)
89− theme.DiffAddedBgColor = lipgloss.Color("#1D2419") // Darker green background
90− theme.DiffRemovedBgColor = lipgloss.Color("#241919") // Darker red background
91− theme.DiffContextBgColor = lipgloss.Color(flexokiBlack)
92− theme.DiffLineNumberColor = lipgloss.Color(flexokiBase700)
93− theme.DiffAddedLineNumberBgColor = lipgloss.Color("#1A2017") // Slightly darker green
94− theme.DiffRemovedLineNumberBgColor = lipgloss.Color("#201717") // Slightly darker red
95−
96− // Markdown colors
97− theme.MarkdownTextColor = lipgloss.Color(flexokiBase300)
98− theme.MarkdownHeadingColor = lipgloss.Color(flexokiYellow400)
99− theme.MarkdownLinkColor = lipgloss.Color(flexokiCyan400)
100− theme.MarkdownLinkTextColor = lipgloss.Color(flexokiMagenta400)
101− theme.MarkdownCodeColor = lipgloss.Color(flexokiGreen400)
102− theme.MarkdownBlockQuoteColor = lipgloss.Color(flexokiCyan400)
103− theme.MarkdownEmphColor = lipgloss.Color(flexokiYellow400)
104− theme.MarkdownStrongColor = lipgloss.Color(flexokiOrange400)
105− theme.MarkdownHorizontalRuleColor = lipgloss.Color(flexokiBase800)
106− theme.MarkdownListItemColor = lipgloss.Color(flexokiBlue400)
107− theme.MarkdownListEnumerationColor = lipgloss.Color(flexokiBlue400)
108− theme.MarkdownImageColor = lipgloss.Color(flexokiPurple400)
109− theme.MarkdownImageTextColor = lipgloss.Color(flexokiMagenta400)
110− theme.MarkdownCodeBlockColor = lipgloss.Color(flexokiBase300)
111−
112− // Syntax highlighting colors (based on Flexoki's mappings)
113− theme.SyntaxCommentColor = lipgloss.Color(flexokiBase700) // tx-3
114− theme.SyntaxKeywordColor = lipgloss.Color(flexokiGreen400) // gr
115− theme.SyntaxFunctionColor = lipgloss.Color(flexokiOrange400) // or
116− theme.SyntaxVariableColor = lipgloss.Color(flexokiBlue400) // bl
117− theme.SyntaxStringColor = lipgloss.Color(flexokiCyan400) // cy
118− theme.SyntaxNumberColor = lipgloss.Color(flexokiPurple400) // pu
119− theme.SyntaxTypeColor = lipgloss.Color(flexokiYellow400) // ye
120− theme.SyntaxOperatorColor = lipgloss.Color(flexokiBase500) // tx-2
121− theme.SyntaxPunctuationColor = lipgloss.Color(flexokiBase500) // tx-2
122−
123− return theme
124−}
125−
126−// NewFlexokiLightTheme creates a new instance of the Flexoki Light theme.
127−func NewFlexokiLightTheme() *FlexokiTheme {
128− theme := &FlexokiTheme{}
129−
130− // Base colors
131− theme.PrimaryColor = lipgloss.Color(flexokiBlue600)
132− theme.SecondaryColor = lipgloss.Color(flexokiPurple600)
133− theme.AccentColor = lipgloss.Color(flexokiOrange600)
134−
135− // Status colors
136− theme.ErrorColor = lipgloss.Color(flexokiRed600)
137− theme.WarningColor = lipgloss.Color(flexokiYellow600)
138− theme.SuccessColor = lipgloss.Color(flexokiGreen600)
139− theme.InfoColor = lipgloss.Color(flexokiCyan600)
140−
141− // Text colors
142− theme.TextColor = lipgloss.Color(flexokiBase600)
143− theme.TextMutedColor = lipgloss.Color(flexokiBase500)
144− theme.TextEmphasizedColor = lipgloss.Color(flexokiYellow600)
145−
146− // Background colors
147− theme.BackgroundColor = lipgloss.Color(flexokiPaper)
148− theme.BackgroundSecondaryColor = lipgloss.Color(flexokiBase50)
149− theme.BackgroundDarkerColor = lipgloss.Color(flexokiBase100)
150−
151− // Border colors
152− theme.BorderNormalColor = lipgloss.Color(flexokiBase100)
153− theme.BorderFocusedColor = lipgloss.Color(flexokiBlue600)
154− theme.BorderDimColor = lipgloss.Color(flexokiBase150)
155−
156− // Diff view colors
157− theme.DiffAddedColor = lipgloss.Color(flexokiGreen600)
158− theme.DiffRemovedColor = lipgloss.Color(flexokiRed600)
159− theme.DiffContextColor = lipgloss.Color(flexokiBase500)
160− theme.DiffHunkHeaderColor = lipgloss.Color(flexokiBase500)
161− theme.DiffHighlightAddedColor = lipgloss.Color(flexokiGreen600)
162− theme.DiffHighlightRemovedColor = lipgloss.Color(flexokiRed600)
163− theme.DiffAddedBgColor = lipgloss.Color("#EFF2E2") // Light green background
164− theme.DiffRemovedBgColor = lipgloss.Color("#F2E2E2") // Light red background
165− theme.DiffContextBgColor = lipgloss.Color(flexokiPaper)
166− theme.DiffLineNumberColor = lipgloss.Color(flexokiBase500)
167− theme.DiffAddedLineNumberBgColor = lipgloss.Color("#E5EBD9") // Light green
168− theme.DiffRemovedLineNumberBgColor = lipgloss.Color("#EBD9D9") // Light red
169−
170− // Markdown colors
171− theme.MarkdownTextColor = lipgloss.Color(flexokiBase600)
172− theme.MarkdownHeadingColor = lipgloss.Color(flexokiYellow600)
173− theme.MarkdownLinkColor = lipgloss.Color(flexokiCyan600)
174− theme.MarkdownLinkTextColor = lipgloss.Color(flexokiMagenta600)
175− theme.MarkdownCodeColor = lipgloss.Color(flexokiGreen600)
176− theme.MarkdownBlockQuoteColor = lipgloss.Color(flexokiCyan600)
177− theme.MarkdownEmphColor = lipgloss.Color(flexokiYellow600)
178− theme.MarkdownStrongColor = lipgloss.Color(flexokiOrange600)
179− theme.MarkdownHorizontalRuleColor = lipgloss.Color(flexokiBase200)
180− theme.MarkdownListItemColor = lipgloss.Color(flexokiBlue600)
181− theme.MarkdownListEnumerationColor = lipgloss.Color(flexokiBlue600)
182− theme.MarkdownImageColor = lipgloss.Color(flexokiPurple600)
183− theme.MarkdownImageTextColor = lipgloss.Color(flexokiMagenta600)
184− theme.MarkdownCodeBlockColor = lipgloss.Color(flexokiBase600)
185−
186− // Syntax highlighting colors (based on Flexoki's mappings)
187− theme.SyntaxCommentColor = lipgloss.Color(flexokiBase300) // tx-3
188− theme.SyntaxKeywordColor = lipgloss.Color(flexokiGreen600) // gr
189− theme.SyntaxFunctionColor = lipgloss.Color(flexokiOrange600) // or
190− theme.SyntaxVariableColor = lipgloss.Color(flexokiBlue600) // bl
191− theme.SyntaxStringColor = lipgloss.Color(flexokiCyan600) // cy
192− theme.SyntaxNumberColor = lipgloss.Color(flexokiPurple600) // pu
193− theme.SyntaxTypeColor = lipgloss.Color(flexokiYellow600) // ye
194− theme.SyntaxOperatorColor = lipgloss.Color(flexokiBase500) // tx-2
195− theme.SyntaxPunctuationColor = lipgloss.Color(flexokiBase500) // tx-2
196−
197− return theme
198−}
199−
200−func init() {
201− // Register the Flexoki themes with the theme manager
202− RegisterTheme("flexoki-dark", NewFlexokiDarkTheme())
203− RegisterTheme("flexoki-light", NewFlexokiLightTheme())
204−}
internal/tui/theme/gruvbox.godeleted−224
@@ -1,224 +0,0 @@
1−package theme
2−
3−import (
4− "github.com/charmbracelet/lipgloss/v2"
5−)
6−
7−// Gruvbox color palette constants
8−const (
9− // Dark theme colors
10− gruvboxDarkBg0 = "#282828"
11− gruvboxDarkBg0Soft = "#32302f"
12− gruvboxDarkBg1 = "#3c3836"
13− gruvboxDarkBg2 = "#504945"
14− gruvboxDarkBg3 = "#665c54"
15− gruvboxDarkBg4 = "#7c6f64"
16− gruvboxDarkFg0 = "#fbf1c7"
17− gruvboxDarkFg1 = "#ebdbb2"
18− gruvboxDarkFg2 = "#d5c4a1"
19− gruvboxDarkFg3 = "#bdae93"
20− gruvboxDarkFg4 = "#a89984"
21− gruvboxDarkGray = "#928374"
22− gruvboxDarkRed = "#cc241d"
23− gruvboxDarkRedBright = "#fb4934"
24− gruvboxDarkGreen = "#98971a"
25− gruvboxDarkGreenBright = "#b8bb26"
26− gruvboxDarkYellow = "#d79921"
27− gruvboxDarkYellowBright = "#fabd2f"
28− gruvboxDarkBlue = "#458588"
29− gruvboxDarkBlueBright = "#83a598"
30− gruvboxDarkPurple = "#b16286"
31− gruvboxDarkPurpleBright = "#d3869b"
32− gruvboxDarkAqua = "#689d6a"
33− gruvboxDarkAquaBright = "#8ec07c"
34− gruvboxDarkOrange = "#d65d0e"
35− gruvboxDarkOrangeBright = "#fe8019"
36−
37− // Light theme colors
38− gruvboxLightBg0 = "#fbf1c7"
39− gruvboxLightBg0Soft = "#f2e5bc"
40− gruvboxLightBg1 = "#ebdbb2"
41− gruvboxLightBg2 = "#d5c4a1"
42− gruvboxLightBg3 = "#bdae93"
43− gruvboxLightBg4 = "#a89984"
44− gruvboxLightFg0 = "#282828"
45− gruvboxLightFg1 = "#3c3836"
46− gruvboxLightFg2 = "#504945"
47− gruvboxLightFg3 = "#665c54"
48− gruvboxLightFg4 = "#7c6f64"
49− gruvboxLightGray = "#928374"
50− gruvboxLightRed = "#9d0006"
51− gruvboxLightRedBright = "#cc241d"
52− gruvboxLightGreen = "#79740e"
53− gruvboxLightGreenBright = "#98971a"
54− gruvboxLightYellow = "#b57614"
55− gruvboxLightYellowBright = "#d79921"
56− gruvboxLightBlue = "#076678"
57− gruvboxLightBlueBright = "#458588"
58− gruvboxLightPurple = "#8f3f71"
59− gruvboxLightPurpleBright = "#b16286"
60− gruvboxLightAqua = "#427b58"
61− gruvboxLightAquaBright = "#689d6a"
62− gruvboxLightOrange = "#af3a03"
63− gruvboxLightOrangeBright = "#d65d0e"
64−)
65−
66−// GruvboxTheme implements the Theme interface with Gruvbox colors.
67−// It provides both dark and light variants.
68−type GruvboxTheme struct {
69− BaseTheme
70−}
71−
72−// NewGruvboxTheme creates a new instance of the Gruvbox theme.
73−func NewGruvboxTheme() *GruvboxTheme {
74− theme := &GruvboxTheme{}
75−
76− // Base colors
77− theme.PrimaryColor = lipgloss.Color(gruvboxDarkBlueBright)
78− theme.SecondaryColor = lipgloss.Color(gruvboxDarkPurpleBright)
79− theme.AccentColor = lipgloss.Color(gruvboxDarkOrangeBright)
80−
81− // Status colors
82− theme.ErrorColor = lipgloss.Color(gruvboxDarkRedBright)
83− theme.WarningColor = lipgloss.Color(gruvboxDarkYellowBright)
84− theme.SuccessColor = lipgloss.Color(gruvboxDarkGreenBright)
85− theme.InfoColor = lipgloss.Color(gruvboxDarkBlueBright)
86−
87− // Text colors
88− theme.TextColor = lipgloss.Color(gruvboxDarkFg1)
89− theme.TextMutedColor = lipgloss.Color(gruvboxDarkFg4)
90− theme.TextEmphasizedColor = lipgloss.Color(gruvboxDarkYellowBright)
91−
92− // Background colors
93− theme.BackgroundColor = lipgloss.Color(gruvboxDarkBg0)
94− theme.BackgroundSecondaryColor = lipgloss.Color(gruvboxDarkBg1)
95− theme.BackgroundDarkerColor = lipgloss.Color(gruvboxDarkBg0Soft)
96−
97− // Border colors
98− theme.BorderNormalColor = lipgloss.Color(gruvboxDarkBg2)
99− theme.BorderFocusedColor = lipgloss.Color(gruvboxDarkBlueBright)
100− theme.BorderDimColor = lipgloss.Color(gruvboxDarkBg1)
101−
102− // Diff view colors
103− theme.DiffAddedColor = lipgloss.Color(gruvboxDarkGreenBright)
104− theme.DiffRemovedColor = lipgloss.Color(gruvboxDarkRedBright)
105− theme.DiffContextColor = lipgloss.Color(gruvboxDarkFg4)
106− theme.DiffHunkHeaderColor = lipgloss.Color(gruvboxDarkFg3)
107− theme.DiffHighlightAddedColor = lipgloss.Color(gruvboxDarkGreenBright)
108− theme.DiffHighlightRemovedColor = lipgloss.Color(gruvboxDarkRedBright)
109− theme.DiffAddedBgColor = lipgloss.Color("#3C4C3C") // Darker green background
110− theme.DiffRemovedBgColor = lipgloss.Color("#4C3C3C") // Darker red background
111− theme.DiffContextBgColor = lipgloss.Color(gruvboxDarkBg0)
112− theme.DiffLineNumberColor = lipgloss.Color(gruvboxDarkFg4)
113− theme.DiffAddedLineNumberBgColor = lipgloss.Color("#32432F") // Slightly darker green
114− theme.DiffRemovedLineNumberBgColor = lipgloss.Color("#43322F") // Slightly darker red
115−
116− // Markdown colors
117− theme.MarkdownTextColor = lipgloss.Color(gruvboxDarkFg1)
118− theme.MarkdownHeadingColor = lipgloss.Color(gruvboxDarkYellowBright)
119− theme.MarkdownLinkColor = lipgloss.Color(gruvboxDarkBlueBright)
120− theme.MarkdownLinkTextColor = lipgloss.Color(gruvboxDarkAquaBright)
121− theme.MarkdownCodeColor = lipgloss.Color(gruvboxDarkGreenBright)
122− theme.MarkdownBlockQuoteColor = lipgloss.Color(gruvboxDarkAquaBright)
123− theme.MarkdownEmphColor = lipgloss.Color(gruvboxDarkYellowBright)
124− theme.MarkdownStrongColor = lipgloss.Color(gruvboxDarkOrangeBright)
125− theme.MarkdownHorizontalRuleColor = lipgloss.Color(gruvboxDarkBg3)
126− theme.MarkdownListItemColor = lipgloss.Color(gruvboxDarkBlueBright)
127− theme.MarkdownListEnumerationColor = lipgloss.Color(gruvboxDarkBlueBright)
128− theme.MarkdownImageColor = lipgloss.Color(gruvboxDarkPurpleBright)
129− theme.MarkdownImageTextColor = lipgloss.Color(gruvboxDarkAquaBright)
130− theme.MarkdownCodeBlockColor = lipgloss.Color(gruvboxDarkFg1)
131−
132− // Syntax highlighting colors
133− theme.SyntaxCommentColor = lipgloss.Color(gruvboxDarkGray)
134− theme.SyntaxKeywordColor = lipgloss.Color(gruvboxDarkRedBright)
135− theme.SyntaxFunctionColor = lipgloss.Color(gruvboxDarkGreenBright)
136− theme.SyntaxVariableColor = lipgloss.Color(gruvboxDarkBlueBright)
137− theme.SyntaxStringColor = lipgloss.Color(gruvboxDarkYellowBright)
138− theme.SyntaxNumberColor = lipgloss.Color(gruvboxDarkPurpleBright)
139− theme.SyntaxTypeColor = lipgloss.Color(gruvboxDarkYellow)
140− theme.SyntaxOperatorColor = lipgloss.Color(gruvboxDarkAquaBright)
141− theme.SyntaxPunctuationColor = lipgloss.Color(gruvboxDarkFg1)
142−
143− return theme
144−}
145−
146−// NewGruvboxLightTheme creates a new instance of the Gruvbox Light theme.
147−func NewGruvboxLightTheme() *GruvboxTheme {
148− theme := &GruvboxTheme{}
149−
150− // Base colors
151− theme.PrimaryColor = lipgloss.Color(gruvboxLightBlueBright)
152− theme.SecondaryColor = lipgloss.Color(gruvboxLightPurpleBright)
153− theme.AccentColor = lipgloss.Color(gruvboxLightOrangeBright)
154−
155− // Status colors
156− theme.ErrorColor = lipgloss.Color(gruvboxLightRedBright)
157− theme.WarningColor = lipgloss.Color(gruvboxLightYellowBright)
158− theme.SuccessColor = lipgloss.Color(gruvboxLightGreenBright)
159− theme.InfoColor = lipgloss.Color(gruvboxLightBlueBright)
160−
161− // Text colors
162− theme.TextColor = lipgloss.Color(gruvboxLightFg1)
163− theme.TextMutedColor = lipgloss.Color(gruvboxLightFg4)
164− theme.TextEmphasizedColor = lipgloss.Color(gruvboxLightYellowBright)
165−
166− // Background colors
167− theme.BackgroundColor = lipgloss.Color(gruvboxLightBg0)
168− theme.BackgroundSecondaryColor = lipgloss.Color(gruvboxLightBg1)
169− theme.BackgroundDarkerColor = lipgloss.Color(gruvboxLightBg0Soft)
170−
171− // Border colors
172− theme.BorderNormalColor = lipgloss.Color(gruvboxLightBg2)
173− theme.BorderFocusedColor = lipgloss.Color(gruvboxLightBlueBright)
174− theme.BorderDimColor = lipgloss.Color(gruvboxLightBg1)
175−
176− // Diff view colors
177− theme.DiffAddedColor = lipgloss.Color(gruvboxLightGreenBright)
178− theme.DiffRemovedColor = lipgloss.Color(gruvboxLightRedBright)
179− theme.DiffContextColor = lipgloss.Color(gruvboxLightFg4)
180− theme.DiffHunkHeaderColor = lipgloss.Color(gruvboxLightFg3)
181− theme.DiffHighlightAddedColor = lipgloss.Color(gruvboxLightGreenBright)
182− theme.DiffHighlightRemovedColor = lipgloss.Color(gruvboxLightRedBright)
183− theme.DiffAddedBgColor = lipgloss.Color("#E8F5E9") // Light green background
184− theme.DiffRemovedBgColor = lipgloss.Color("#FFEBEE") // Light red background
185− theme.DiffContextBgColor = lipgloss.Color(gruvboxLightBg0)
186− theme.DiffLineNumberColor = lipgloss.Color(gruvboxLightFg4)
187− theme.DiffAddedLineNumberBgColor = lipgloss.Color("#C8E6C9") // Light green
188− theme.DiffRemovedLineNumberBgColor = lipgloss.Color("#FFCDD2") // Light red
189−
190− // Markdown colors
191− theme.MarkdownTextColor = lipgloss.Color(gruvboxLightFg1)
192− theme.MarkdownHeadingColor = lipgloss.Color(gruvboxLightYellowBright)
193− theme.MarkdownLinkColor = lipgloss.Color(gruvboxLightBlueBright)
194− theme.MarkdownLinkTextColor = lipgloss.Color(gruvboxLightAquaBright)
195− theme.MarkdownCodeColor = lipgloss.Color(gruvboxLightGreenBright)
196− theme.MarkdownBlockQuoteColor = lipgloss.Color(gruvboxLightAquaBright)
197− theme.MarkdownEmphColor = lipgloss.Color(gruvboxLightYellowBright)
198− theme.MarkdownStrongColor = lipgloss.Color(gruvboxLightOrangeBright)
199− theme.MarkdownHorizontalRuleColor = lipgloss.Color(gruvboxLightBg3)
200− theme.MarkdownListItemColor = lipgloss.Color(gruvboxLightBlueBright)
201− theme.MarkdownListEnumerationColor = lipgloss.Color(gruvboxLightBlueBright)
202− theme.MarkdownImageColor = lipgloss.Color(gruvboxLightPurpleBright)
203− theme.MarkdownImageTextColor = lipgloss.Color(gruvboxLightAquaBright)
204− theme.MarkdownCodeBlockColor = lipgloss.Color(gruvboxLightFg1)
205−
206− // Syntax highlighting colors
207− theme.SyntaxCommentColor = lipgloss.Color(gruvboxLightGray)
208− theme.SyntaxKeywordColor = lipgloss.Color(gruvboxLightRedBright)
209− theme.SyntaxFunctionColor = lipgloss.Color(gruvboxLightGreenBright)
210− theme.SyntaxVariableColor = lipgloss.Color(gruvboxLightBlueBright)
211− theme.SyntaxStringColor = lipgloss.Color(gruvboxLightYellowBright)
212− theme.SyntaxNumberColor = lipgloss.Color(gruvboxLightPurpleBright)
213− theme.SyntaxTypeColor = lipgloss.Color(gruvboxLightYellow)
214− theme.SyntaxOperatorColor = lipgloss.Color(gruvboxLightAquaBright)
215− theme.SyntaxPunctuationColor = lipgloss.Color(gruvboxLightFg1)
216−
217− return theme
218−}
219−
220−func init() {
221− // Register the Gruvbox themes with the theme manager
222− RegisterTheme("gruvbox", NewGruvboxTheme())
223− RegisterTheme("gruvbox-light", NewGruvboxLightTheme())
224−}
internal/tui/theme/manager.godeleted−124
@@ -1,124 +0,0 @@
1−package theme
2−
3−import (
4− "fmt"
5− "image/color"
6− "slices"
7− "strings"
8− "sync"
9−
10− "github.com/alecthomas/chroma/v2/styles"
11− "github.com/opencode-ai/opencode/internal/config"
12− "github.com/opencode-ai/opencode/internal/logging"
13−)
14−
15−// Manager handles theme registration, selection, and retrieval.
16−// It maintains a registry of available themes and tracks the currently active theme.
17−type Manager struct {
18− themes map[string]Theme
19− currentName string
20− mu sync.RWMutex
21−}
22−
23−// Global instance of the theme manager
24−var globalManager = &Manager{
25− themes: make(map[string]Theme),
26− currentName: "",
27−}
28−
29−// RegisterTheme adds a new theme to the registry.
30−// If this is the first theme registered, it becomes the default.
31−func RegisterTheme(name string, theme Theme) {
32− globalManager.mu.Lock()
33− defer globalManager.mu.Unlock()
34−
35− globalManager.themes[name] = theme
36−
37− // If this is the first theme, make it the default
38− if globalManager.currentName == "" {
39− globalManager.currentName = name
40− }
41−}
42−
43−// SetTheme changes the active theme to the one with the specified name.
44−// Returns an error if the theme doesn't exist.
45−func SetTheme(name string) error {
46− globalManager.mu.Lock()
47− defer globalManager.mu.Unlock()
48−
49− delete(styles.Registry, "charm")
50− if _, exists := globalManager.themes[name]; !exists {
51− return fmt.Errorf("theme '%s' not found", name)
52− }
53−
54− globalManager.currentName = name
55−
56− // Update the config file using viper
57− if err := updateConfigTheme(name); err != nil {
58− // Log the error but don't fail the theme change
59− logging.Warn("Warning: Failed to update config file with new theme", "err", err)
60− }
61−
62− return nil
63−}
64−
65−// CurrentTheme returns the currently active theme.
66−// If no theme is set, it returns nil.
67−func CurrentTheme() Theme {
68− globalManager.mu.RLock()
69− defer globalManager.mu.RUnlock()
70−
71− if globalManager.currentName == "" {
72− return nil
73− }
74−
75− return globalManager.themes[globalManager.currentName]
76−}
77−
78−func GetColor(c color.Color) string {
79− rgba := color.RGBAModel.Convert(c).(color.RGBA)
80− return fmt.Sprintf("#%02x%02x%02x", rgba.R, rgba.G, rgba.B)
81−}
82−
83−// CurrentThemeName returns the name of the currently active theme.
84−func CurrentThemeName() string {
85− globalManager.mu.RLock()
86− defer globalManager.mu.RUnlock()
87−
88− return globalManager.currentName
89−}
90−
91−// AvailableThemes returns a list of all registered theme names.
92−func AvailableThemes() []string {
93− globalManager.mu.RLock()
94− defer globalManager.mu.RUnlock()
95−
96− names := make([]string, 0, len(globalManager.themes))
97− for name := range globalManager.themes {
98− names = append(names, name)
99− }
100− slices.SortFunc(names, func(a, b string) int {
101− if a == "opencode" {
102− return -1
103− } else if b == "opencode" {
104− return 1
105− }
106− return strings.Compare(a, b)
107− })
108− return names
109−}
110−
111−// GetTheme returns a specific theme by name.
112−// Returns nil if the theme doesn't exist.
113−func GetTheme(name string) Theme {
114− globalManager.mu.RLock()
115− defer globalManager.mu.RUnlock()
116−
117− return globalManager.themes[name]
118−}
119−
120−// updateConfigTheme updates the theme setting in the configuration file
121−func updateConfigTheme(themeName string) error {
122− // Use the config package to update the theme
123− return config.UpdateTheme(themeName)
124−}
internal/tui/theme/monokai.godeleted−195
@@ -1,195 +0,0 @@
1−package theme
2−
3−import (
4− "github.com/charmbracelet/lipgloss/v2"
5−)
6−
7−// MonokaiProTheme implements the Theme interface with Monokai Pro colors.
8−// It provides both dark and light variants.
9−type MonokaiProTheme struct {
10− BaseTheme
11−}
12−
13−// NewMonokaiProTheme creates a new instance of the Monokai Pro theme.
14−func NewMonokaiProTheme() *MonokaiProTheme {
15− // Monokai Pro color palette (dark mode)
16− darkBackground := "#2d2a2e"
17− darkCurrentLine := "#403e41"
18− darkSelection := "#5b595c"
19− darkForeground := "#fcfcfa"
20− darkComment := "#727072"
21− darkRed := "#ff6188"
22− darkOrange := "#fc9867"
23− darkYellow := "#ffd866"
24− darkGreen := "#a9dc76"
25− darkCyan := "#78dce8"
26− darkBlue := "#ab9df2"
27− darkPurple := "#ab9df2"
28− darkBorder := "#403e41"
29−
30− theme := &MonokaiProTheme{}
31−
32− // Base colors
33− theme.PrimaryColor = lipgloss.Color(darkCyan)
34− theme.SecondaryColor = lipgloss.Color(darkPurple)
35− theme.AccentColor = lipgloss.Color(darkOrange)
36−
37− // Status colors
38− theme.ErrorColor = lipgloss.Color(darkRed)
39− theme.WarningColor = lipgloss.Color(darkOrange)
40− theme.SuccessColor = lipgloss.Color(darkGreen)
41− theme.InfoColor = lipgloss.Color(darkBlue)
42−
43− // Text colors
44− theme.TextColor = lipgloss.Color(darkForeground)
45− theme.TextMutedColor = lipgloss.Color(darkComment)
46− theme.TextEmphasizedColor = lipgloss.Color(darkYellow)
47−
48− // Background colors
49− theme.BackgroundColor = lipgloss.Color(darkBackground)
50− theme.BackgroundSecondaryColor = lipgloss.Color(darkCurrentLine)
51− theme.BackgroundDarkerColor = lipgloss.Color("#221f22") // Slightly darker than background
52−
53− // Border colors
54− theme.BorderNormalColor = lipgloss.Color(darkBorder)
55− theme.BorderFocusedColor = lipgloss.Color(darkCyan)
56− theme.BorderDimColor = lipgloss.Color(darkSelection)
57−
58− // Diff view colors
59− theme.DiffAddedColor = lipgloss.Color("#a9dc76")
60− theme.DiffRemovedColor = lipgloss.Color("#ff6188")
61− theme.DiffContextColor = lipgloss.Color("#a0a0a0")
62− theme.DiffHunkHeaderColor = lipgloss.Color("#a0a0a0")
63− theme.DiffHighlightAddedColor = lipgloss.Color("#c2e7a9")
64− theme.DiffHighlightRemovedColor = lipgloss.Color("#ff8ca6")
65− theme.DiffAddedBgColor = lipgloss.Color("#3a4a35")
66− theme.DiffRemovedBgColor = lipgloss.Color("#4a3439")
67− theme.DiffContextBgColor = lipgloss.Color(darkBackground)
68− theme.DiffLineNumberColor = lipgloss.Color("#888888")
69− theme.DiffAddedLineNumberBgColor = lipgloss.Color("#2d3a28")
70− theme.DiffRemovedLineNumberBgColor = lipgloss.Color("#3d2a2e")
71−
72− // Markdown colors
73− theme.MarkdownTextColor = lipgloss.Color(darkForeground)
74− theme.MarkdownHeadingColor = lipgloss.Color(darkPurple)
75− theme.MarkdownLinkColor = lipgloss.Color(darkCyan)
76− theme.MarkdownLinkTextColor = lipgloss.Color(darkBlue)
77− theme.MarkdownCodeColor = lipgloss.Color(darkGreen)
78− theme.MarkdownBlockQuoteColor = lipgloss.Color(darkYellow)
79− theme.MarkdownEmphColor = lipgloss.Color(darkYellow)
80− theme.MarkdownStrongColor = lipgloss.Color(darkOrange)
81− theme.MarkdownHorizontalRuleColor = lipgloss.Color(darkComment)
82− theme.MarkdownListItemColor = lipgloss.Color(darkCyan)
83− theme.MarkdownListEnumerationColor = lipgloss.Color(darkBlue)
84− theme.MarkdownImageColor = lipgloss.Color(darkCyan)
85− theme.MarkdownImageTextColor = lipgloss.Color(darkBlue)
86− theme.MarkdownCodeBlockColor = lipgloss.Color(darkForeground)
87−
88− // Syntax highlighting colors
89− theme.SyntaxCommentColor = lipgloss.Color(darkComment)
90− theme.SyntaxKeywordColor = lipgloss.Color(darkRed)
91− theme.SyntaxFunctionColor = lipgloss.Color(darkGreen)
92− theme.SyntaxVariableColor = lipgloss.Color(darkForeground)
93− theme.SyntaxStringColor = lipgloss.Color(darkYellow)
94− theme.SyntaxNumberColor = lipgloss.Color(darkPurple)
95− theme.SyntaxTypeColor = lipgloss.Color(darkBlue)
96− theme.SyntaxOperatorColor = lipgloss.Color(darkCyan)
97− theme.SyntaxPunctuationColor = lipgloss.Color(darkForeground)
98−
99− return theme
100−}
101−
102−// NewMonokaiProLightTheme creates a new instance of the Monokai Pro Light theme.
103−func NewMonokaiProLightTheme() *MonokaiProTheme {
104− // Light mode colors (adapted from dark)
105− lightBackground := "#fafafa"
106− lightCurrentLine := "#f0f0f0"
107− lightSelection := "#e5e5e6"
108− lightForeground := "#2d2a2e"
109− lightComment := "#939293"
110− lightRed := "#f92672"
111− lightOrange := "#fd971f"
112− lightYellow := "#e6db74"
113− lightGreen := "#9bca65"
114− lightCyan := "#66d9ef"
115− lightBlue := "#7e75db"
116− lightPurple := "#ae81ff"
117− lightBorder := "#d3d3d3"
118−
119− theme := &MonokaiProTheme{}
120−
121− // Base colors
122− theme.PrimaryColor = lipgloss.Color(lightCyan)
123− theme.SecondaryColor = lipgloss.Color(lightPurple)
124− theme.AccentColor = lipgloss.Color(lightOrange)
125−
126− // Status colors
127− theme.ErrorColor = lipgloss.Color(lightRed)
128− theme.WarningColor = lipgloss.Color(lightOrange)
129− theme.SuccessColor = lipgloss.Color(lightGreen)
130− theme.InfoColor = lipgloss.Color(lightBlue)
131−
132− // Text colors
133− theme.TextColor = lipgloss.Color(lightForeground)
134− theme.TextMutedColor = lipgloss.Color(lightComment)
135− theme.TextEmphasizedColor = lipgloss.Color(lightYellow)
136−
137− // Background colors
138− theme.BackgroundColor = lipgloss.Color(lightBackground)
139− theme.BackgroundSecondaryColor = lipgloss.Color(lightCurrentLine)
140− theme.BackgroundDarkerColor = lipgloss.Color("#ffffff") // Slightly lighter than background
141−
142− // Border colors
143− theme.BorderNormalColor = lipgloss.Color(lightBorder)
144− theme.BorderFocusedColor = lipgloss.Color(lightCyan)
145− theme.BorderDimColor = lipgloss.Color(lightSelection)
146−
147− // Diff view colors
148− theme.DiffAddedColor = lipgloss.Color("#9bca65")
149− theme.DiffRemovedColor = lipgloss.Color("#f92672")
150− theme.DiffContextColor = lipgloss.Color("#757575")
151− theme.DiffHunkHeaderColor = lipgloss.Color("#757575")
152− theme.DiffHighlightAddedColor = lipgloss.Color("#c5e0b4")
153− theme.DiffHighlightRemovedColor = lipgloss.Color("#ffb3c8")
154− theme.DiffAddedBgColor = lipgloss.Color("#e8f5e9")
155− theme.DiffRemovedBgColor = lipgloss.Color("#ffebee")
156− theme.DiffContextBgColor = lipgloss.Color(lightBackground)
157− theme.DiffLineNumberColor = lipgloss.Color("#9e9e9e")
158− theme.DiffAddedLineNumberBgColor = lipgloss.Color("#c8e6c9")
159− theme.DiffRemovedLineNumberBgColor = lipgloss.Color("#ffcdd2")
160−
161− // Markdown colors
162− theme.MarkdownTextColor = lipgloss.Color(lightForeground)
163− theme.MarkdownHeadingColor = lipgloss.Color(lightPurple)
164− theme.MarkdownLinkColor = lipgloss.Color(lightCyan)
165− theme.MarkdownLinkTextColor = lipgloss.Color(lightBlue)
166− theme.MarkdownCodeColor = lipgloss.Color(lightGreen)
167− theme.MarkdownBlockQuoteColor = lipgloss.Color(lightYellow)
168− theme.MarkdownEmphColor = lipgloss.Color(lightYellow)
169− theme.MarkdownStrongColor = lipgloss.Color(lightOrange)
170− theme.MarkdownHorizontalRuleColor = lipgloss.Color(lightComment)
171− theme.MarkdownListItemColor = lipgloss.Color(lightCyan)
172− theme.MarkdownListEnumerationColor = lipgloss.Color(lightBlue)
173− theme.MarkdownImageColor = lipgloss.Color(lightCyan)
174− theme.MarkdownImageTextColor = lipgloss.Color(lightBlue)
175− theme.MarkdownCodeBlockColor = lipgloss.Color(lightForeground)
176−
177− // Syntax highlighting colors
178− theme.SyntaxCommentColor = lipgloss.Color(lightComment)
179− theme.SyntaxKeywordColor = lipgloss.Color(lightRed)
180− theme.SyntaxFunctionColor = lipgloss.Color(lightGreen)
181− theme.SyntaxVariableColor = lipgloss.Color(lightForeground)
182− theme.SyntaxStringColor = lipgloss.Color(lightYellow)
183− theme.SyntaxNumberColor = lipgloss.Color(lightPurple)
184− theme.SyntaxTypeColor = lipgloss.Color(lightBlue)
185− theme.SyntaxOperatorColor = lipgloss.Color(lightCyan)
186− theme.SyntaxPunctuationColor = lipgloss.Color(lightForeground)
187−
188− return theme
189−}
190−
191−func init() {
192− // Register the Monokai Pro themes with the theme manager
193− RegisterTheme("monokai", NewMonokaiProTheme())
194− RegisterTheme("monokai-light", NewMonokaiProLightTheme())
195−}
internal/tui/theme/onedark.godeleted−196
@@ -1,196 +0,0 @@
1−package theme
2−
3−import (
4− "github.com/charmbracelet/lipgloss/v2"
5−)
6−
7−// OneDarkTheme implements the Theme interface with Atom's One Dark colors.
8−// It provides both dark and light variants.
9−type OneDarkTheme struct {
10− BaseTheme
11−}
12−
13−// NewOneDarkTheme creates a new instance of the One Dark theme.
14−func NewOneDarkTheme() *OneDarkTheme {
15− // One Dark color palette
16− // Dark mode colors from Atom One Dark
17− darkBackground := "#282c34"
18− darkCurrentLine := "#2c313c"
19− darkSelection := "#3e4451"
20− darkForeground := "#abb2bf"
21− darkComment := "#5c6370"
22− darkRed := "#e06c75"
23− darkOrange := "#d19a66"
24− darkYellow := "#e5c07b"
25− darkGreen := "#98c379"
26− darkCyan := "#56b6c2"
27− darkBlue := "#61afef"
28− darkPurple := "#c678dd"
29− darkBorder := "#3b4048"
30−
31− theme := &OneDarkTheme{}
32−
33− // Base colors
34− theme.PrimaryColor = lipgloss.Color(darkBlue)
35− theme.SecondaryColor = lipgloss.Color(darkPurple)
36− theme.AccentColor = lipgloss.Color(darkOrange)
37−
38− // Status colors
39− theme.ErrorColor = lipgloss.Color(darkRed)
40− theme.WarningColor = lipgloss.Color(darkOrange)
41− theme.SuccessColor = lipgloss.Color(darkGreen)
42− theme.InfoColor = lipgloss.Color(darkBlue)
43−
44− // Text colors
45− theme.TextColor = lipgloss.Color(darkForeground)
46− theme.TextMutedColor = lipgloss.Color(darkComment)
47− theme.TextEmphasizedColor = lipgloss.Color(darkYellow)
48−
49− // Background colors
50− theme.BackgroundColor = lipgloss.Color(darkBackground)
51− theme.BackgroundSecondaryColor = lipgloss.Color(darkCurrentLine)
52− theme.BackgroundDarkerColor = lipgloss.Color("#21252b") // Slightly darker than background
53−
54− // Border colors
55− theme.BorderNormalColor = lipgloss.Color(darkBorder)
56− theme.BorderFocusedColor = lipgloss.Color(darkBlue)
57− theme.BorderDimColor = lipgloss.Color(darkSelection)
58−
59− // Diff view colors
60− theme.DiffAddedColor = lipgloss.Color("#478247")
61− theme.DiffRemovedColor = lipgloss.Color("#7C4444")
62− theme.DiffContextColor = lipgloss.Color("#a0a0a0")
63− theme.DiffHunkHeaderColor = lipgloss.Color("#a0a0a0")
64− theme.DiffHighlightAddedColor = lipgloss.Color("#DAFADA")
65− theme.DiffHighlightRemovedColor = lipgloss.Color("#FADADD")
66− theme.DiffAddedBgColor = lipgloss.Color("#303A30")
67− theme.DiffRemovedBgColor = lipgloss.Color("#3A3030")
68− theme.DiffContextBgColor = lipgloss.Color(darkBackground)
69− theme.DiffLineNumberColor = lipgloss.Color("#888888")
70− theme.DiffAddedLineNumberBgColor = lipgloss.Color("#293229")
71− theme.DiffRemovedLineNumberBgColor = lipgloss.Color("#332929")
72−
73− // Markdown colors
74− theme.MarkdownTextColor = lipgloss.Color(darkForeground)
75− theme.MarkdownHeadingColor = lipgloss.Color(darkPurple)
76− theme.MarkdownLinkColor = lipgloss.Color(darkBlue)
77− theme.MarkdownLinkTextColor = lipgloss.Color(darkCyan)
78− theme.MarkdownCodeColor = lipgloss.Color(darkGreen)
79− theme.MarkdownBlockQuoteColor = lipgloss.Color(darkYellow)
80− theme.MarkdownEmphColor = lipgloss.Color(darkYellow)
81− theme.MarkdownStrongColor = lipgloss.Color(darkOrange)
82− theme.MarkdownHorizontalRuleColor = lipgloss.Color(darkComment)
83− theme.MarkdownListItemColor = lipgloss.Color(darkBlue)
84− theme.MarkdownListEnumerationColor = lipgloss.Color(darkCyan)
85− theme.MarkdownImageColor = lipgloss.Color(darkBlue)
86− theme.MarkdownImageTextColor = lipgloss.Color(darkCyan)
87− theme.MarkdownCodeBlockColor = lipgloss.Color(darkForeground)
88−
89− // Syntax highlighting colors
90− theme.SyntaxCommentColor = lipgloss.Color(darkComment)
91− theme.SyntaxKeywordColor = lipgloss.Color(darkPurple)
92− theme.SyntaxFunctionColor = lipgloss.Color(darkBlue)
93− theme.SyntaxVariableColor = lipgloss.Color(darkRed)
94− theme.SyntaxStringColor = lipgloss.Color(darkGreen)
95− theme.SyntaxNumberColor = lipgloss.Color(darkOrange)
96− theme.SyntaxTypeColor = lipgloss.Color(darkYellow)
97− theme.SyntaxOperatorColor = lipgloss.Color(darkCyan)
98− theme.SyntaxPunctuationColor = lipgloss.Color(darkForeground)
99−
100− return theme
101−}
102−
103−// NewOneLightTheme creates a new instance of the One Light theme.
104−func NewOneLightTheme() *OneDarkTheme {
105− // Light mode colors from Atom One Light
106− lightBackground := "#fafafa"
107− lightCurrentLine := "#f0f0f0"
108− lightSelection := "#e5e5e6"
109− lightForeground := "#383a42"
110− lightComment := "#a0a1a7"
111− lightRed := "#e45649"
112− lightOrange := "#da8548"
113− lightYellow := "#c18401"
114− lightGreen := "#50a14f"
115− lightCyan := "#0184bc"
116− lightBlue := "#4078f2"
117− lightPurple := "#a626a4"
118− lightBorder := "#d3d3d3"
119−
120− theme := &OneDarkTheme{}
121−
122− // Base colors
123− theme.PrimaryColor = lipgloss.Color(lightBlue)
124− theme.SecondaryColor = lipgloss.Color(lightPurple)
125− theme.AccentColor = lipgloss.Color(lightOrange)
126−
127− // Status colors
128− theme.ErrorColor = lipgloss.Color(lightRed)
129− theme.WarningColor = lipgloss.Color(lightOrange)
130− theme.SuccessColor = lipgloss.Color(lightGreen)
131− theme.InfoColor = lipgloss.Color(lightBlue)
132−
133− // Text colors
134− theme.TextColor = lipgloss.Color(lightForeground)
135− theme.TextMutedColor = lipgloss.Color(lightComment)
136− theme.TextEmphasizedColor = lipgloss.Color(lightYellow)
137−
138− // Background colors
139− theme.BackgroundColor = lipgloss.Color(lightBackground)
140− theme.BackgroundSecondaryColor = lipgloss.Color(lightCurrentLine)
141− theme.BackgroundDarkerColor = lipgloss.Color("#ffffff") // Slightly lighter than background
142−
143− // Border colors
144− theme.BorderNormalColor = lipgloss.Color(lightBorder)
145− theme.BorderFocusedColor = lipgloss.Color(lightBlue)
146− theme.BorderDimColor = lipgloss.Color(lightSelection)
147−
148− // Diff view colors
149− theme.DiffAddedColor = lipgloss.Color("#2E7D32")
150− theme.DiffRemovedColor = lipgloss.Color("#C62828")
151− theme.DiffContextColor = lipgloss.Color("#757575")
152− theme.DiffHunkHeaderColor = lipgloss.Color("#757575")
153− theme.DiffHighlightAddedColor = lipgloss.Color("#A5D6A7")
154− theme.DiffHighlightRemovedColor = lipgloss.Color("#EF9A9A")
155− theme.DiffAddedBgColor = lipgloss.Color("#E8F5E9")
156− theme.DiffRemovedBgColor = lipgloss.Color("#FFEBEE")
157− theme.DiffContextBgColor = lipgloss.Color(lightBackground)
158− theme.DiffLineNumberColor = lipgloss.Color("#9E9E9E")
159− theme.DiffAddedLineNumberBgColor = lipgloss.Color("#C8E6C9")
160− theme.DiffRemovedLineNumberBgColor = lipgloss.Color("#FFCDD2")
161−
162− // Markdown colors
163− theme.MarkdownTextColor = lipgloss.Color(lightForeground)
164− theme.MarkdownHeadingColor = lipgloss.Color(lightPurple)
165− theme.MarkdownLinkColor = lipgloss.Color(lightBlue)
166− theme.MarkdownLinkTextColor = lipgloss.Color(lightCyan)
167− theme.MarkdownCodeColor = lipgloss.Color(lightGreen)
168− theme.MarkdownBlockQuoteColor = lipgloss.Color(lightYellow)
169− theme.MarkdownEmphColor = lipgloss.Color(lightYellow)
170− theme.MarkdownStrongColor = lipgloss.Color(lightOrange)
171− theme.MarkdownHorizontalRuleColor = lipgloss.Color(lightComment)
172− theme.MarkdownListItemColor = lipgloss.Color(lightBlue)
173− theme.MarkdownListEnumerationColor = lipgloss.Color(lightCyan)
174− theme.MarkdownImageColor = lipgloss.Color(lightBlue)
175− theme.MarkdownImageTextColor = lipgloss.Color(lightCyan)
176− theme.MarkdownCodeBlockColor = lipgloss.Color(lightForeground)
177−
178− // Syntax highlighting colors
179− theme.SyntaxCommentColor = lipgloss.Color(lightComment)
180− theme.SyntaxKeywordColor = lipgloss.Color(lightPurple)
181− theme.SyntaxFunctionColor = lipgloss.Color(lightBlue)
182− theme.SyntaxVariableColor = lipgloss.Color(lightRed)
183− theme.SyntaxStringColor = lipgloss.Color(lightGreen)
184− theme.SyntaxNumberColor = lipgloss.Color(lightOrange)
185− theme.SyntaxTypeColor = lipgloss.Color(lightYellow)
186− theme.SyntaxOperatorColor = lipgloss.Color(lightCyan)
187− theme.SyntaxPunctuationColor = lipgloss.Color(lightForeground)
188−
189− return theme
190−}
191−
192−func init() {
193− // Register the One Dark and One Light themes with the theme manager
194− RegisterTheme("onedark", NewOneDarkTheme())
195− RegisterTheme("onelight", NewOneLightTheme())
196−}
internal/tui/theme/opencode.godeleted−199
@@ -1,199 +0,0 @@
1−package theme
2−
3−import (
4− "github.com/charmbracelet/lipgloss/v2"
5−)
6−
7−// OpenCodeTheme implements the Theme interface with OpenCode brand colors.
8−// It provides both dark and light variants.
9−type OpenCodeTheme struct {
10− BaseTheme
11−}
12−
13−// NewOpenCodeDarkTheme creates a new instance of the OpenCode Dark theme.
14−func NewOpenCodeDarkTheme() *OpenCodeTheme {
15− // OpenCode color palette
16− // Dark mode colors
17− darkBackground := "#212121"
18− darkCurrentLine := "#252525"
19− darkSelection := "#303030"
20− darkForeground := "#e0e0e0"
21− darkComment := "#6a6a6a"
22− darkPrimary := "#fab283" // Primary orange/gold
23− darkSecondary := "#5c9cf5" // Secondary blue
24− darkAccent := "#9d7cd8" // Accent purple
25− darkRed := "#e06c75" // Error red
26− darkOrange := "#f5a742" // Warning orange
27− darkGreen := "#7fd88f" // Success green
28− darkCyan := "#56b6c2" // Info cyan
29− darkYellow := "#e5c07b" // Emphasized text
30− darkBorder := "#4b4c5c" // Border color
31−
32− theme := &OpenCodeTheme{}
33−
34− // Base colors
35− theme.PrimaryColor = lipgloss.Color(darkPrimary)
36− theme.SecondaryColor = lipgloss.Color(darkSecondary)
37− theme.AccentColor = lipgloss.Color(darkAccent)
38−
39− // Status colors
40− theme.ErrorColor = lipgloss.Color(darkRed)
41− theme.WarningColor = lipgloss.Color(darkOrange)
42− theme.SuccessColor = lipgloss.Color(darkGreen)
43− theme.InfoColor = lipgloss.Color(darkCyan)
44−
45− // Text colors
46− theme.TextColor = lipgloss.Color(darkForeground)
47− theme.TextMutedColor = lipgloss.Color(darkComment)
48− theme.TextEmphasizedColor = lipgloss.Color(darkYellow)
49−
50− // Background colors
51− theme.BackgroundColor = lipgloss.Color(darkBackground)
52− theme.BackgroundSecondaryColor = lipgloss.Color(darkCurrentLine)
53− theme.BackgroundDarkerColor = lipgloss.Color("#121212") // Slightly darker than background
54−
55− // Border colors
56− theme.BorderNormalColor = lipgloss.Color(darkBorder)
57− theme.BorderFocusedColor = lipgloss.Color(darkPrimary)
58− theme.BorderDimColor = lipgloss.Color(darkSelection)
59−
60− // Diff view colors
61− theme.DiffAddedColor = lipgloss.Color("#478247")
62− theme.DiffRemovedColor = lipgloss.Color("#7C4444")
63− theme.DiffContextColor = lipgloss.Color("#a0a0a0")
64− theme.DiffHunkHeaderColor = lipgloss.Color("#a0a0a0")
65− // TODO: change these colors to be what we want
66− theme.DiffHighlightAddedColor = lipgloss.Color("#256125")
67− theme.DiffHighlightRemovedColor = lipgloss.Color("#612726")
68− theme.DiffAddedBgColor = lipgloss.Color("#303A30")
69− theme.DiffRemovedBgColor = lipgloss.Color("#3A3030")
70− theme.DiffContextBgColor = lipgloss.Color(darkBackground)
71− theme.DiffLineNumberColor = lipgloss.Color("#888888")
72− theme.DiffAddedLineNumberBgColor = lipgloss.Color("#293229")
73− theme.DiffRemovedLineNumberBgColor = lipgloss.Color("#332929")
74−
75− // Markdown colors
76− theme.MarkdownTextColor = lipgloss.Color(darkForeground)
77− theme.MarkdownHeadingColor = lipgloss.Color(darkSecondary)
78− theme.MarkdownLinkColor = lipgloss.Color(darkPrimary)
79− theme.MarkdownLinkTextColor = lipgloss.Color(darkCyan)
80− theme.MarkdownCodeColor = lipgloss.Color(darkGreen)
81− theme.MarkdownBlockQuoteColor = lipgloss.Color(darkYellow)
82− theme.MarkdownEmphColor = lipgloss.Color(darkYellow)
83− theme.MarkdownStrongColor = lipgloss.Color(darkAccent)
84− theme.MarkdownHorizontalRuleColor = lipgloss.Color(darkComment)
85− theme.MarkdownListItemColor = lipgloss.Color(darkPrimary)
86− theme.MarkdownListEnumerationColor = lipgloss.Color(darkCyan)
87− theme.MarkdownImageColor = lipgloss.Color(darkPrimary)
88− theme.MarkdownImageTextColor = lipgloss.Color(darkCyan)
89− theme.MarkdownCodeBlockColor = lipgloss.Color(darkForeground)
90−
91− // Syntax highlighting colors
92− theme.SyntaxCommentColor = lipgloss.Color(darkComment)
93− theme.SyntaxKeywordColor = lipgloss.Color(darkSecondary)
94− theme.SyntaxFunctionColor = lipgloss.Color(darkPrimary)
95− theme.SyntaxVariableColor = lipgloss.Color(darkRed)
96− theme.SyntaxStringColor = lipgloss.Color(darkGreen)
97− theme.SyntaxNumberColor = lipgloss.Color(darkAccent)
98− theme.SyntaxTypeColor = lipgloss.Color(darkYellow)
99− theme.SyntaxOperatorColor = lipgloss.Color(darkCyan)
100− theme.SyntaxPunctuationColor = lipgloss.Color(darkForeground)
101−
102− return theme
103−}
104−
105−// NewOpenCodeLightTheme creates a new instance of the OpenCode Light theme.
106−func NewOpenCodeLightTheme() *OpenCodeTheme {
107− // Light mode colors
108− lightBackground := "#f8f8f8"
109− lightCurrentLine := "#f0f0f0"
110− lightSelection := "#e5e5e6"
111− lightForeground := "#2a2a2a"
112− lightComment := "#8a8a8a"
113− lightPrimary := "#3b7dd8" // Primary blue
114− lightSecondary := "#7b5bb6" // Secondary purple
115− lightAccent := "#d68c27" // Accent orange/gold
116− lightRed := "#d1383d" // Error red
117− lightOrange := "#d68c27" // Warning orange
118− lightGreen := "#3d9a57" // Success green
119− lightCyan := "#318795" // Info cyan
120− lightYellow := "#b0851f" // Emphasized text
121− lightBorder := "#d3d3d3" // Border color
122−
123− theme := &OpenCodeTheme{}
124−
125− // Base colors
126− theme.PrimaryColor = lipgloss.Color(lightPrimary)
127− theme.SecondaryColor = lipgloss.Color(lightSecondary)
128− theme.AccentColor = lipgloss.Color(lightAccent)
129−
130− // Status colors
131− theme.ErrorColor = lipgloss.Color(lightRed)
132− theme.WarningColor = lipgloss.Color(lightOrange)
133− theme.SuccessColor = lipgloss.Color(lightGreen)
134− theme.InfoColor = lipgloss.Color(lightCyan)
135−
136− // Text colors
137− theme.TextColor = lipgloss.Color(lightForeground)
138− theme.TextMutedColor = lipgloss.Color(lightComment)
139− theme.TextEmphasizedColor = lipgloss.Color(lightYellow)
140−
141− // Background colors
142− theme.BackgroundColor = lipgloss.Color(lightBackground)
143− theme.BackgroundSecondaryColor = lipgloss.Color(lightCurrentLine)
144− theme.BackgroundDarkerColor = lipgloss.Color("#ffffff") // Slightly lighter than background
145−
146− // Border colors
147− theme.BorderNormalColor = lipgloss.Color(lightBorder)
148− theme.BorderFocusedColor = lipgloss.Color(lightPrimary)
149− theme.BorderDimColor = lipgloss.Color(lightSelection)
150−
151− // Diff view colors
152− theme.DiffAddedColor = lipgloss.Color("#2E7D32")
153− theme.DiffRemovedColor = lipgloss.Color("#C62828")
154− theme.DiffContextColor = lipgloss.Color("#757575")
155− theme.DiffHunkHeaderColor = lipgloss.Color("#757575")
156− theme.DiffHighlightAddedColor = lipgloss.Color("#A5D6A7")
157− theme.DiffHighlightRemovedColor = lipgloss.Color("#EF9A9A")
158− theme.DiffAddedBgColor = lipgloss.Color("#E8F5E9")
159− theme.DiffRemovedBgColor = lipgloss.Color("#FFEBEE")
160− theme.DiffContextBgColor = lipgloss.Color(lightBackground)
161− theme.DiffLineNumberColor = lipgloss.Color("#9E9E9E")
162− theme.DiffAddedLineNumberBgColor = lipgloss.Color("#C8E6C9")
163− theme.DiffRemovedLineNumberBgColor = lipgloss.Color("#FFCDD2")
164−
165− // Markdown colors
166− theme.MarkdownTextColor = lipgloss.Color(lightForeground)
167− theme.MarkdownHeadingColor = lipgloss.Color(lightSecondary)
168− theme.MarkdownLinkColor = lipgloss.Color(lightPrimary)
169− theme.MarkdownLinkTextColor = lipgloss.Color(lightCyan)
170− theme.MarkdownCodeColor = lipgloss.Color(lightGreen)
171− theme.MarkdownBlockQuoteColor = lipgloss.Color(lightYellow)
172− theme.MarkdownEmphColor = lipgloss.Color(lightYellow)
173− theme.MarkdownStrongColor = lipgloss.Color(lightAccent)
174− theme.MarkdownHorizontalRuleColor = lipgloss.Color(lightComment)
175− theme.MarkdownListItemColor = lipgloss.Color(lightPrimary)
176− theme.MarkdownListEnumerationColor = lipgloss.Color(lightCyan)
177− theme.MarkdownImageColor = lipgloss.Color(lightPrimary)
178− theme.MarkdownImageTextColor = lipgloss.Color(lightCyan)
179− theme.MarkdownCodeBlockColor = lipgloss.Color(lightForeground)
180−
181− // Syntax highlighting colors
182− theme.SyntaxCommentColor = lipgloss.Color(lightComment)
183− theme.SyntaxKeywordColor = lipgloss.Color(lightSecondary)
184− theme.SyntaxFunctionColor = lipgloss.Color(lightPrimary)
185− theme.SyntaxVariableColor = lipgloss.Color(lightRed)
186− theme.SyntaxStringColor = lipgloss.Color(lightGreen)
187− theme.SyntaxNumberColor = lipgloss.Color(lightAccent)
188− theme.SyntaxTypeColor = lipgloss.Color(lightYellow)
189− theme.SyntaxOperatorColor = lipgloss.Color(lightCyan)
190− theme.SyntaxPunctuationColor = lipgloss.Color(lightForeground)
191−
192− return theme
193−}
194−
195−func init() {
196− // Register the OpenCode themes with the theme manager
197− RegisterTheme("opencode-dark", NewOpenCodeDarkTheme())
198− RegisterTheme("opencode-light", NewOpenCodeLightTheme())
199−}
internal/tui/theme/theme.godeleted−205
@@ -1,205 +0,0 @@
1−package theme
2−
3−import (
4− "image/color"
5−)
6−
7−type Theme interface {
8− // Base colors
9− Primary() color.Color
10− Secondary() color.Color
11− Accent() color.Color
12−
13− // Status colors
14− Error() color.Color
15− Warning() color.Color
16− Success() color.Color
17− Info() color.Color
18−
19− // Text colors
20− Text() color.Color
21− TextMuted() color.Color
22− TextEmphasized() color.Color
23−
24− // Background colors
25− Background() color.Color
26− BackgroundSecondary() color.Color
27− BackgroundDarker() color.Color
28−
29− // Border colors
30− BorderNormal() color.Color
31− BorderFocused() color.Color
32− BorderDim() color.Color
33−
34− // Diff view colors
35− DiffAdded() color.Color
36− DiffRemoved() color.Color
37− DiffContext() color.Color
38− DiffHunkHeader() color.Color
39− DiffHighlightAdded() color.Color
40− DiffHighlightRemoved() color.Color
41− DiffAddedBg() color.Color
42− DiffRemovedBg() color.Color
43− DiffContextBg() color.Color
44− DiffLineNumber() color.Color
45− DiffAddedLineNumberBg() color.Color
46− DiffRemovedLineNumberBg() color.Color
47−
48− // Markdown colors
49− MarkdownText() color.Color
50− MarkdownHeading() color.Color
51− MarkdownLink() color.Color
52− MarkdownLinkText() color.Color
53− MarkdownCode() color.Color
54− MarkdownBlockQuote() color.Color
55− MarkdownEmph() color.Color
56− MarkdownStrong() color.Color
57− MarkdownHorizontalRule() color.Color
58− MarkdownListItem() color.Color
59− MarkdownListEnumeration() color.Color
60− MarkdownImage() color.Color
61− MarkdownImageText() color.Color
62− MarkdownCodeBlock() color.Color
63−
64− // Syntax highlighting colors
65− SyntaxComment() color.Color
66− SyntaxKeyword() color.Color
67− SyntaxFunction() color.Color
68− SyntaxVariable() color.Color
69− SyntaxString() color.Color
70− SyntaxNumber() color.Color
71− SyntaxType() color.Color
72− SyntaxOperator() color.Color
73− SyntaxPunctuation() color.Color
74−}
75−
76−// BaseTheme provides a default implementation of the Theme interface
77−// that can be embedded in concrete theme implementations.
78−type BaseTheme struct {
79− // Base colors
80− PrimaryColor color.Color
81− SecondaryColor color.Color
82− AccentColor color.Color
83−
84− // Status colors
85− ErrorColor color.Color
86− WarningColor color.Color
87− SuccessColor color.Color
88− InfoColor color.Color
89−
90− // Text colors
91− TextColor color.Color
92− TextMutedColor color.Color
93− TextEmphasizedColor color.Color
94−
95− // Background colors
96− BackgroundColor color.Color
97− BackgroundSecondaryColor color.Color
98− BackgroundDarkerColor color.Color
99−
100− // Border colors
101− BorderNormalColor color.Color
102− BorderFocusedColor color.Color
103− BorderDimColor color.Color
104−
105− // Diff view colors
106− DiffAddedColor color.Color
107− DiffRemovedColor color.Color
108− DiffContextColor color.Color
109− DiffHunkHeaderColor color.Color
110− DiffHighlightAddedColor color.Color
111− DiffHighlightRemovedColor color.Color
112− DiffAddedBgColor color.Color
113− DiffRemovedBgColor color.Color
114− DiffContextBgColor color.Color
115− DiffLineNumberColor color.Color
116− DiffAddedLineNumberBgColor color.Color
117− DiffRemovedLineNumberBgColor color.Color
118−
119− // Markdown colors
120− MarkdownTextColor color.Color
121− MarkdownHeadingColor color.Color
122− MarkdownLinkColor color.Color
123− MarkdownLinkTextColor color.Color
124− MarkdownCodeColor color.Color
125− MarkdownBlockQuoteColor color.Color
126− MarkdownEmphColor color.Color
127− MarkdownStrongColor color.Color
128− MarkdownHorizontalRuleColor color.Color
129− MarkdownListItemColor color.Color
130− MarkdownListEnumerationColor color.Color
131− MarkdownImageColor color.Color
132− MarkdownImageTextColor color.Color
133− MarkdownCodeBlockColor color.Color
134−
135− // Syntax highlighting colors
136− SyntaxCommentColor color.Color
137− SyntaxKeywordColor color.Color
138− SyntaxFunctionColor color.Color
139− SyntaxVariableColor color.Color
140− SyntaxStringColor color.Color
141− SyntaxNumberColor color.Color
142− SyntaxTypeColor color.Color
143− SyntaxOperatorColor color.Color
144− SyntaxPunctuationColor color.Color
145−}
146−
147−// Implement the Theme interface for BaseTheme
148−func (t *BaseTheme) Primary() color.Color { return t.PrimaryColor }
149−func (t *BaseTheme) Secondary() color.Color { return t.SecondaryColor }
150−func (t *BaseTheme) Accent() color.Color { return t.AccentColor }
151−
152−func (t *BaseTheme) Error() color.Color { return t.ErrorColor }
153−func (t *BaseTheme) Warning() color.Color { return t.WarningColor }
154−func (t *BaseTheme) Success() color.Color { return t.SuccessColor }
155−func (t *BaseTheme) Info() color.Color { return t.InfoColor }
156−
157−func (t *BaseTheme) Text() color.Color { return t.TextColor }
158−func (t *BaseTheme) TextMuted() color.Color { return t.TextMutedColor }
159−func (t *BaseTheme) TextEmphasized() color.Color { return t.TextEmphasizedColor }
160−
161−func (t *BaseTheme) Background() color.Color { return t.BackgroundColor }
162−func (t *BaseTheme) BackgroundSecondary() color.Color { return t.BackgroundSecondaryColor }
163−func (t *BaseTheme) BackgroundDarker() color.Color { return t.BackgroundDarkerColor }
164−
165−func (t *BaseTheme) BorderNormal() color.Color { return t.BorderNormalColor }
166−func (t *BaseTheme) BorderFocused() color.Color { return t.BorderFocusedColor }
167−func (t *BaseTheme) BorderDim() color.Color { return t.BorderDimColor }
168−
169−func (t *BaseTheme) DiffAdded() color.Color { return t.DiffAddedColor }
170−func (t *BaseTheme) DiffRemoved() color.Color { return t.DiffRemovedColor }
171−func (t *BaseTheme) DiffContext() color.Color { return t.DiffContextColor }
172−func (t *BaseTheme) DiffHunkHeader() color.Color { return t.DiffHunkHeaderColor }
173−func (t *BaseTheme) DiffHighlightAdded() color.Color { return t.DiffHighlightAddedColor }
174−func (t *BaseTheme) DiffHighlightRemoved() color.Color { return t.DiffHighlightRemovedColor }
175−func (t *BaseTheme) DiffAddedBg() color.Color { return t.DiffAddedBgColor }
176−func (t *BaseTheme) DiffRemovedBg() color.Color { return t.DiffRemovedBgColor }
177−func (t *BaseTheme) DiffContextBg() color.Color { return t.DiffContextBgColor }
178−func (t *BaseTheme) DiffLineNumber() color.Color { return t.DiffLineNumberColor }
179−func (t *BaseTheme) DiffAddedLineNumberBg() color.Color { return t.DiffAddedLineNumberBgColor }
180−func (t *BaseTheme) DiffRemovedLineNumberBg() color.Color { return t.DiffRemovedLineNumberBgColor }
181−
182−func (t *BaseTheme) MarkdownText() color.Color { return t.MarkdownTextColor }
183−func (t *BaseTheme) MarkdownHeading() color.Color { return t.MarkdownHeadingColor }
184−func (t *BaseTheme) MarkdownLink() color.Color { return t.MarkdownLinkColor }
185−func (t *BaseTheme) MarkdownLinkText() color.Color { return t.MarkdownLinkTextColor }
186−func (t *BaseTheme) MarkdownCode() color.Color { return t.MarkdownCodeColor }
187−func (t *BaseTheme) MarkdownBlockQuote() color.Color { return t.MarkdownBlockQuoteColor }
188−func (t *BaseTheme) MarkdownEmph() color.Color { return t.MarkdownEmphColor }
189−func (t *BaseTheme) MarkdownStrong() color.Color { return t.MarkdownStrongColor }
190−func (t *BaseTheme) MarkdownHorizontalRule() color.Color { return t.MarkdownHorizontalRuleColor }
191−func (t *BaseTheme) MarkdownListItem() color.Color { return t.MarkdownListItemColor }
192−func (t *BaseTheme) MarkdownListEnumeration() color.Color { return t.MarkdownListEnumerationColor }
193−func (t *BaseTheme) MarkdownImage() color.Color { return t.MarkdownImageColor }
194−func (t *BaseTheme) MarkdownImageText() color.Color { return t.MarkdownImageTextColor }
195−func (t *BaseTheme) MarkdownCodeBlock() color.Color { return t.MarkdownCodeBlockColor }
196−
197−func (t *BaseTheme) SyntaxComment() color.Color { return t.SyntaxCommentColor }
198−func (t *BaseTheme) SyntaxKeyword() color.Color { return t.SyntaxKeywordColor }
199−func (t *BaseTheme) SyntaxFunction() color.Color { return t.SyntaxFunctionColor }
200−func (t *BaseTheme) SyntaxVariable() color.Color { return t.SyntaxVariableColor }
201−func (t *BaseTheme) SyntaxString() color.Color { return t.SyntaxStringColor }
202−func (t *BaseTheme) SyntaxNumber() color.Color { return t.SyntaxNumberColor }
203−func (t *BaseTheme) SyntaxType() color.Color { return t.SyntaxTypeColor }
204−func (t *BaseTheme) SyntaxOperator() color.Color { return t.SyntaxOperatorColor }
205−func (t *BaseTheme) SyntaxPunctuation() color.Color { return t.SyntaxPunctuationColor }
internal/tui/theme/theme_test.godeleted−89
@@ -1,89 +0,0 @@
1−package theme
2−
3−import (
4− "testing"
5−)
6−
7−func TestThemeRegistration(t *testing.T) {
8− // Get list of available themes
9− availableThemes := AvailableThemes()
10−
11− // Check if "catppuccin" theme is registered
12− catppuccinFound := false
13− for _, themeName := range availableThemes {
14− if themeName == "catppuccin" {
15− catppuccinFound = true
16− break
17− }
18− }
19−
20− if !catppuccinFound {
21− t.Errorf("Catppuccin theme is not registered")
22− }
23−
24− // Check if "gruvbox" theme is registered
25− gruvboxFound := false
26− for _, themeName := range availableThemes {
27− if themeName == "gruvbox" {
28− gruvboxFound = true
29− break
30− }
31− }
32−
33− if !gruvboxFound {
34− t.Errorf("Gruvbox theme is not registered")
35− }
36−
37− // Check if "monokai" theme is registered
38− monokaiFound := false
39− for _, themeName := range availableThemes {
40− if themeName == "monokai" {
41− monokaiFound = true
42− break
43− }
44− }
45−
46− if !monokaiFound {
47− t.Errorf("Monokai theme is not registered")
48− }
49−
50− // Try to get the themes and make sure they're not nil
51− catppuccin := GetTheme("catppuccin")
52− if catppuccin == nil {
53− t.Errorf("Catppuccin theme is nil")
54− }
55−
56− gruvbox := GetTheme("gruvbox")
57− if gruvbox == nil {
58− t.Errorf("Gruvbox theme is nil")
59− }
60−
61− monokai := GetTheme("monokai")
62− if monokai == nil {
63− t.Errorf("Monokai theme is nil")
64− }
65−
66− // Test switching theme
67− originalTheme := CurrentThemeName()
68−
69− err := SetTheme("gruvbox")
70− if err != nil {
71− t.Errorf("Failed to set theme to gruvbox: %v", err)
72− }
73−
74− if CurrentThemeName() != "gruvbox" {
75− t.Errorf("Theme not properly switched to gruvbox")
76− }
77−
78− err = SetTheme("monokai")
79− if err != nil {
80− t.Errorf("Failed to set theme to monokai: %v", err)
81− }
82−
83− if CurrentThemeName() != "monokai" {
84− t.Errorf("Theme not properly switched to monokai")
85− }
86−
87− // Switch back to original theme
88− _ = SetTheme(originalTheme)
89−}
internal/tui/theme/tokyonight.godeleted−196
@@ -1,196 +0,0 @@
1−package theme
2−
3−import (
4− "github.com/charmbracelet/lipgloss/v2"
5−)
6−
7−// TokyoNightTheme implements the Theme interface with Tokyo Night colors.
8−// It provides both dark and light variants.
9−type TokyoNightTheme struct {
10− BaseTheme
11−}
12−
13−// NewTokyoNightTheme creates a new instance of the Tokyo Night theme.
14−func NewTokyoNightTheme() *TokyoNightTheme {
15− // Tokyo Night color palette
16− // Dark mode colors
17− darkBackground := "#222436"
18− darkCurrentLine := "#1e2030"
19− darkSelection := "#2f334d"
20− darkForeground := "#c8d3f5"
21− darkComment := "#636da6"
22− darkRed := "#ff757f"
23− darkOrange := "#ff966c"
24− darkYellow := "#ffc777"
25− darkGreen := "#c3e88d"
26− darkCyan := "#86e1fc"
27− darkBlue := "#82aaff"
28− darkPurple := "#c099ff"
29− darkBorder := "#3b4261"
30−
31− theme := &TokyoNightTheme{}
32−
33− // Base colors
34− theme.PrimaryColor = lipgloss.Color(darkBlue)
35− theme.SecondaryColor = lipgloss.Color(darkPurple)
36− theme.AccentColor = lipgloss.Color(darkOrange)
37−
38− // Status colors
39− theme.ErrorColor = lipgloss.Color(darkRed)
40− theme.WarningColor = lipgloss.Color(darkOrange)
41− theme.SuccessColor = lipgloss.Color(darkGreen)
42− theme.InfoColor = lipgloss.Color(darkBlue)
43−
44− // Text colors
45− theme.TextColor = lipgloss.Color(darkForeground)
46− theme.TextMutedColor = lipgloss.Color(darkComment)
47− theme.TextEmphasizedColor = lipgloss.Color(darkYellow)
48−
49− // Background colors
50− theme.BackgroundColor = lipgloss.Color(darkBackground)
51− theme.BackgroundSecondaryColor = lipgloss.Color(darkCurrentLine)
52− theme.BackgroundDarkerColor = lipgloss.Color("#191B29") // Darker background from palette
53−
54− // Border colors
55− theme.BorderNormalColor = lipgloss.Color(darkBorder)
56− theme.BorderFocusedColor = lipgloss.Color(darkBlue)
57− theme.BorderDimColor = lipgloss.Color(darkSelection)
58−
59− // Diff view colors
60− theme.DiffAddedColor = lipgloss.Color("#4fd6be") // teal from palette
61− theme.DiffRemovedColor = lipgloss.Color("#c53b53") // red1 from palette
62− theme.DiffContextColor = lipgloss.Color("#828bb8") // fg_dark from palette
63− theme.DiffHunkHeaderColor = lipgloss.Color("#828bb8") // fg_dark from palette
64− theme.DiffHighlightAddedColor = lipgloss.Color("#b8db87") // git.add from palette
65− theme.DiffHighlightRemovedColor = lipgloss.Color("#e26a75") // git.delete from palette
66− theme.DiffAddedBgColor = lipgloss.Color("#20303b")
67− theme.DiffRemovedBgColor = lipgloss.Color("#37222c")
68− theme.DiffContextBgColor = lipgloss.Color(darkBackground)
69− theme.DiffLineNumberColor = lipgloss.Color("#545c7e") // dark3 from palette
70− theme.DiffAddedLineNumberBgColor = lipgloss.Color("#1b2b34")
71− theme.DiffRemovedLineNumberBgColor = lipgloss.Color("#2d1f26")
72−
73− // Markdown colors
74− theme.MarkdownTextColor = lipgloss.Color(darkForeground)
75− theme.MarkdownHeadingColor = lipgloss.Color(darkPurple)
76− theme.MarkdownLinkColor = lipgloss.Color(darkBlue)
77− theme.MarkdownLinkTextColor = lipgloss.Color(darkCyan)
78− theme.MarkdownCodeColor = lipgloss.Color(darkGreen)
79− theme.MarkdownBlockQuoteColor = lipgloss.Color(darkYellow)
80− theme.MarkdownEmphColor = lipgloss.Color(darkYellow)
81− theme.MarkdownStrongColor = lipgloss.Color(darkOrange)
82− theme.MarkdownHorizontalRuleColor = lipgloss.Color(darkComment)
83− theme.MarkdownListItemColor = lipgloss.Color(darkBlue)
84− theme.MarkdownListEnumerationColor = lipgloss.Color(darkCyan)
85− theme.MarkdownImageColor = lipgloss.Color(darkBlue)
86− theme.MarkdownImageTextColor = lipgloss.Color(darkCyan)
87− theme.MarkdownCodeBlockColor = lipgloss.Color(darkForeground)
88−
89− // Syntax highlighting colors
90− theme.SyntaxCommentColor = lipgloss.Color(darkComment)
91− theme.SyntaxKeywordColor = lipgloss.Color(darkPurple)
92− theme.SyntaxFunctionColor = lipgloss.Color(darkBlue)
93− theme.SyntaxVariableColor = lipgloss.Color(darkRed)
94− theme.SyntaxStringColor = lipgloss.Color(darkGreen)
95− theme.SyntaxNumberColor = lipgloss.Color(darkOrange)
96− theme.SyntaxTypeColor = lipgloss.Color(darkYellow)
97− theme.SyntaxOperatorColor = lipgloss.Color(darkCyan)
98− theme.SyntaxPunctuationColor = lipgloss.Color(darkForeground)
99−
100− return theme
101−}
102−
103−// NewTokyoNightDayTheme creates a new instance of the Tokyo Night Day theme.
104−func NewTokyoNightDayTheme() *TokyoNightTheme {
105− // Light mode colors (Tokyo Night Day)
106− lightBackground := "#e1e2e7"
107− lightCurrentLine := "#d5d6db"
108− lightSelection := "#c8c9ce"
109− lightForeground := "#3760bf"
110− lightComment := "#848cb5"
111− lightRed := "#f52a65"
112− lightOrange := "#b15c00"
113− lightYellow := "#8c6c3e"
114− lightGreen := "#587539"
115− lightCyan := "#007197"
116− lightBlue := "#2e7de9"
117− lightPurple := "#9854f1"
118− lightBorder := "#a8aecb"
119−
120− theme := &TokyoNightTheme{}
121−
122− // Base colors
123− theme.PrimaryColor = lipgloss.Color(lightBlue)
124− theme.SecondaryColor = lipgloss.Color(lightPurple)
125− theme.AccentColor = lipgloss.Color(lightOrange)
126−
127− // Status colors
128− theme.ErrorColor = lipgloss.Color(lightRed)
129− theme.WarningColor = lipgloss.Color(lightOrange)
130− theme.SuccessColor = lipgloss.Color(lightGreen)
131− theme.InfoColor = lipgloss.Color(lightBlue)
132−
133− // Text colors
134− theme.TextColor = lipgloss.Color(lightForeground)
135− theme.TextMutedColor = lipgloss.Color(lightComment)
136− theme.TextEmphasizedColor = lipgloss.Color(lightYellow)
137−
138− // Background colors
139− theme.BackgroundColor = lipgloss.Color(lightBackground)
140− theme.BackgroundSecondaryColor = lipgloss.Color(lightCurrentLine)
141− theme.BackgroundDarkerColor = lipgloss.Color("#f0f0f5") // Slightly lighter than background
142−
143− // Border colors
144− theme.BorderNormalColor = lipgloss.Color(lightBorder)
145− theme.BorderFocusedColor = lipgloss.Color(lightBlue)
146− theme.BorderDimColor = lipgloss.Color(lightSelection)
147−
148− // Diff view colors
149− theme.DiffAddedColor = lipgloss.Color("#1e725c")
150− theme.DiffRemovedColor = lipgloss.Color("#c53b53")
151− theme.DiffContextColor = lipgloss.Color("#7086b5")
152− theme.DiffHunkHeaderColor = lipgloss.Color("#7086b5")
153− theme.DiffHighlightAddedColor = lipgloss.Color("#4db380")
154− theme.DiffHighlightRemovedColor = lipgloss.Color("#f52a65")
155− theme.DiffAddedBgColor = lipgloss.Color("#d5e5d5")
156− theme.DiffRemovedBgColor = lipgloss.Color("#f7d8db")
157− theme.DiffContextBgColor = lipgloss.Color(lightBackground)
158− theme.DiffLineNumberColor = lipgloss.Color("#848cb5")
159− theme.DiffAddedLineNumberBgColor = lipgloss.Color("#c5d5c5")
160− theme.DiffRemovedLineNumberBgColor = lipgloss.Color("#e7c8cb")
161−
162− // Markdown colors
163− theme.MarkdownTextColor = lipgloss.Color(lightForeground)
164− theme.MarkdownHeadingColor = lipgloss.Color(lightPurple)
165− theme.MarkdownLinkColor = lipgloss.Color(lightBlue)
166− theme.MarkdownLinkTextColor = lipgloss.Color(lightCyan)
167− theme.MarkdownCodeColor = lipgloss.Color(lightGreen)
168− theme.MarkdownBlockQuoteColor = lipgloss.Color(lightYellow)
169− theme.MarkdownEmphColor = lipgloss.Color(lightYellow)
170− theme.MarkdownStrongColor = lipgloss.Color(lightOrange)
171− theme.MarkdownHorizontalRuleColor = lipgloss.Color(lightComment)
172− theme.MarkdownListItemColor = lipgloss.Color(lightBlue)
173− theme.MarkdownListEnumerationColor = lipgloss.Color(lightCyan)
174− theme.MarkdownImageColor = lipgloss.Color(lightBlue)
175− theme.MarkdownImageTextColor = lipgloss.Color(lightCyan)
176− theme.MarkdownCodeBlockColor = lipgloss.Color(lightForeground)
177−
178− // Syntax highlighting colors
179− theme.SyntaxCommentColor = lipgloss.Color(lightComment)
180− theme.SyntaxKeywordColor = lipgloss.Color(lightPurple)
181− theme.SyntaxFunctionColor = lipgloss.Color(lightBlue)
182− theme.SyntaxVariableColor = lipgloss.Color(lightRed)
183− theme.SyntaxStringColor = lipgloss.Color(lightGreen)
184− theme.SyntaxNumberColor = lipgloss.Color(lightOrange)
185− theme.SyntaxTypeColor = lipgloss.Color(lightYellow)
186− theme.SyntaxOperatorColor = lipgloss.Color(lightCyan)
187− theme.SyntaxPunctuationColor = lipgloss.Color(lightForeground)
188−
189− return theme
190−}
191−
192−func init() {
193− // Register the Tokyo Night themes with the theme manager
194− RegisterTheme("tokyonight", NewTokyoNightTheme())
195− RegisterTheme("tokyonight-day", NewTokyoNightDayTheme())
196−}
internal/tui/theme/tron.godeleted−198
@@ -1,198 +0,0 @@
1−package theme
2−
3−import (
4− "github.com/charmbracelet/lipgloss/v2"
5−)
6−
7−// TronTheme implements the Theme interface with Tron-inspired colors.
8−// It provides both dark and light variants, though Tron is primarily a dark theme.
9−type TronTheme struct {
10− BaseTheme
11−}
12−
13−// NewTronTheme creates a new instance of the Tron theme.
14−func NewTronTheme() *TronTheme {
15− // Tron color palette
16− // Inspired by the Tron movie's neon aesthetic
17− darkBackground := "#0c141f"
18− darkCurrentLine := "#1a2633"
19− darkSelection := "#1a2633"
20− darkForeground := "#caf0ff"
21− darkComment := "#4d6b87"
22− darkCyan := "#00d9ff"
23− darkBlue := "#007fff"
24− darkOrange := "#ff9000"
25− darkPink := "#ff00a0"
26− darkPurple := "#b73fff"
27− darkRed := "#ff3333"
28− darkYellow := "#ffcc00"
29− darkGreen := "#00ff8f"
30− darkBorder := "#1a2633"
31−
32− theme := &TronTheme{}
33−
34− // Base colors
35− theme.PrimaryColor = lipgloss.Color(darkCyan)
36− theme.SecondaryColor = lipgloss.Color(darkBlue)
37− theme.AccentColor = lipgloss.Color(darkOrange)
38−
39− // Status colors
40− theme.ErrorColor = lipgloss.Color(darkRed)
41− theme.WarningColor = lipgloss.Color(darkOrange)
42− theme.SuccessColor = lipgloss.Color(darkGreen)
43− theme.InfoColor = lipgloss.Color(darkCyan)
44−
45− // Text colors
46− theme.TextColor = lipgloss.Color(darkForeground)
47− theme.TextMutedColor = lipgloss.Color(darkComment)
48− theme.TextEmphasizedColor = lipgloss.Color(darkYellow)
49−
50− // Background colors
51− theme.BackgroundColor = lipgloss.Color(darkBackground)
52− theme.BackgroundSecondaryColor = lipgloss.Color(darkCurrentLine)
53− theme.BackgroundDarkerColor = lipgloss.Color("#070d14") // Slightly darker than background
54−
55− // Border colors
56− theme.BorderNormalColor = lipgloss.Color(darkBorder)
57− theme.BorderFocusedColor = lipgloss.Color(darkCyan)
58− theme.BorderDimColor = lipgloss.Color(darkSelection)
59−
60− // Diff view colors
61− theme.DiffAddedColor = lipgloss.Color(darkGreen)
62− theme.DiffRemovedColor = lipgloss.Color(darkRed)
63− theme.DiffContextColor = lipgloss.Color(darkComment)
64− theme.DiffHunkHeaderColor = lipgloss.Color(darkBlue)
65− theme.DiffHighlightAddedColor = lipgloss.Color("#00ff8f")
66− theme.DiffHighlightRemovedColor = lipgloss.Color("#ff3333")
67− theme.DiffAddedBgColor = lipgloss.Color("#0a2a1a")
68− theme.DiffRemovedBgColor = lipgloss.Color("#2a0a0a")
69− theme.DiffContextBgColor = lipgloss.Color(darkBackground)
70− theme.DiffLineNumberColor = lipgloss.Color(darkComment)
71− theme.DiffAddedLineNumberBgColor = lipgloss.Color("#082015")
72− theme.DiffRemovedLineNumberBgColor = lipgloss.Color("#200808")
73−
74− // Markdown colors
75− theme.MarkdownTextColor = lipgloss.Color(darkForeground)
76− theme.MarkdownHeadingColor = lipgloss.Color(darkCyan)
77− theme.MarkdownLinkColor = lipgloss.Color(darkBlue)
78− theme.MarkdownLinkTextColor = lipgloss.Color(darkCyan)
79− theme.MarkdownCodeColor = lipgloss.Color(darkGreen)
80− theme.MarkdownBlockQuoteColor = lipgloss.Color(darkYellow)
81− theme.MarkdownEmphColor = lipgloss.Color(darkYellow)
82− theme.MarkdownStrongColor = lipgloss.Color(darkOrange)
83− theme.MarkdownHorizontalRuleColor = lipgloss.Color(darkComment)
84− theme.MarkdownListItemColor = lipgloss.Color(darkBlue)
85− theme.MarkdownListEnumerationColor = lipgloss.Color(darkCyan)
86− theme.MarkdownImageColor = lipgloss.Color(darkBlue)
87− theme.MarkdownImageTextColor = lipgloss.Color(darkCyan)
88− theme.MarkdownCodeBlockColor = lipgloss.Color(darkForeground)
89−
90− // Syntax highlighting colors
91− theme.SyntaxCommentColor = lipgloss.Color(darkComment)
92− theme.SyntaxKeywordColor = lipgloss.Color(darkCyan)
93− theme.SyntaxFunctionColor = lipgloss.Color(darkGreen)
94− theme.SyntaxVariableColor = lipgloss.Color(darkOrange)
95− theme.SyntaxStringColor = lipgloss.Color(darkYellow)
96− theme.SyntaxNumberColor = lipgloss.Color(darkBlue)
97− theme.SyntaxTypeColor = lipgloss.Color(darkPurple)
98− theme.SyntaxOperatorColor = lipgloss.Color(darkPink)
99− theme.SyntaxPunctuationColor = lipgloss.Color(darkForeground)
100−
101− return theme
102−}
103−
104−// NewTronLightTheme creates a new instance of the Tron Light theme.
105−func NewTronLightTheme() *TronTheme {
106− // Light mode approximation
107− lightBackground := "#f0f8ff"
108− lightCurrentLine := "#e0f0ff"
109− lightSelection := "#d0e8ff"
110− lightForeground := "#0c141f"
111− lightComment := "#4d6b87"
112− lightCyan := "#0097b3"
113− lightBlue := "#0066cc"
114− lightOrange := "#cc7300"
115− lightPink := "#cc0080"
116− lightPurple := "#9932cc"
117− lightRed := "#cc2929"
118− lightYellow := "#cc9900"
119− lightGreen := "#00cc72"
120− lightBorder := "#d0e8ff"
121−
122− theme := &TronTheme{}
123−
124− // Base colors
125− theme.PrimaryColor = lipgloss.Color(lightCyan)
126− theme.SecondaryColor = lipgloss.Color(lightBlue)
127− theme.AccentColor = lipgloss.Color(lightOrange)
128−
129− // Status colors
130− theme.ErrorColor = lipgloss.Color(lightRed)
131− theme.WarningColor = lipgloss.Color(lightOrange)
132− theme.SuccessColor = lipgloss.Color(lightGreen)
133− theme.InfoColor = lipgloss.Color(lightCyan)
134−
135− // Text colors
136− theme.TextColor = lipgloss.Color(lightForeground)
137− theme.TextMutedColor = lipgloss.Color(lightComment)
138− theme.TextEmphasizedColor = lipgloss.Color(lightYellow)
139−
140− // Background colors
141− theme.BackgroundColor = lipgloss.Color(lightBackground)
142− theme.BackgroundSecondaryColor = lipgloss.Color(lightCurrentLine)
143− theme.BackgroundDarkerColor = lipgloss.Color("#ffffff") // Slightly lighter than background
144−
145− // Border colors
146− theme.BorderNormalColor = lipgloss.Color(lightBorder)
147− theme.BorderFocusedColor = lipgloss.Color(lightCyan)
148− theme.BorderDimColor = lipgloss.Color(lightSelection)
149−
150− // Diff view colors
151− theme.DiffAddedColor = lipgloss.Color(lightGreen)
152− theme.DiffRemovedColor = lipgloss.Color(lightRed)
153− theme.DiffContextColor = lipgloss.Color(lightComment)
154− theme.DiffHunkHeaderColor = lipgloss.Color(lightBlue)
155− theme.DiffHighlightAddedColor = lipgloss.Color("#a5d6a7")
156− theme.DiffHighlightRemovedColor = lipgloss.Color("#ef9a9a")
157− theme.DiffAddedBgColor = lipgloss.Color("#e8f5e9")
158− theme.DiffRemovedBgColor = lipgloss.Color("#ffebee")
159− theme.DiffContextBgColor = lipgloss.Color(lightBackground)
160− theme.DiffLineNumberColor = lipgloss.Color(lightComment)
161− theme.DiffAddedLineNumberBgColor = lipgloss.Color("#c8e6c9")
162− theme.DiffRemovedLineNumberBgColor = lipgloss.Color("#ffcdd2")
163−
164− // Markdown colors
165− theme.MarkdownTextColor = lipgloss.Color(lightForeground)
166− theme.MarkdownHeadingColor = lipgloss.Color(lightCyan)
167− theme.MarkdownLinkColor = lipgloss.Color(lightBlue)
168− theme.MarkdownLinkTextColor = lipgloss.Color(lightCyan)
169− theme.MarkdownCodeColor = lipgloss.Color(lightGreen)
170− theme.MarkdownBlockQuoteColor = lipgloss.Color(lightYellow)
171− theme.MarkdownEmphColor = lipgloss.Color(lightYellow)
172− theme.MarkdownStrongColor = lipgloss.Color(lightOrange)
173− theme.MarkdownHorizontalRuleColor = lipgloss.Color(lightComment)
174− theme.MarkdownListItemColor = lipgloss.Color(lightBlue)
175− theme.MarkdownListEnumerationColor = lipgloss.Color(lightCyan)
176− theme.MarkdownImageColor = lipgloss.Color(lightBlue)
177− theme.MarkdownImageTextColor = lipgloss.Color(lightCyan)
178− theme.MarkdownCodeBlockColor = lipgloss.Color(lightForeground)
179−
180− // Syntax highlighting colors
181− theme.SyntaxCommentColor = lipgloss.Color(lightComment)
182− theme.SyntaxKeywordColor = lipgloss.Color(lightCyan)
183− theme.SyntaxFunctionColor = lipgloss.Color(lightGreen)
184− theme.SyntaxVariableColor = lipgloss.Color(lightOrange)
185− theme.SyntaxStringColor = lipgloss.Color(lightYellow)
186− theme.SyntaxNumberColor = lipgloss.Color(lightBlue)
187− theme.SyntaxTypeColor = lipgloss.Color(lightPurple)
188− theme.SyntaxOperatorColor = lipgloss.Color(lightPink)
189− theme.SyntaxPunctuationColor = lipgloss.Color(lightForeground)
190−
191− return theme
192−}
193−
194−func init() {
195− // Register the Tron themes with the theme manager
196− RegisterTheme("tron", NewTronTheme())
197− RegisterTheme("tron-light", NewTronLightTheme())
198−}