diff options
| author | adamdottv <[email protected]> | 2025-05-15 19:02:27 -0500 |
|---|---|---|
| committer | adamdottv <[email protected]> | 2025-05-15 19:02:27 -0500 |
| commit | d127a1c4ebe326344dc77fe3d136c033da6031fd (patch) | |
| tree | d3a8643eea5ccd1fa61ad69a2c17645f0f1572c9 /internal/tui/theme/manager.go | |
| parent | c9cca48d087cd512cea0b26a0245cbb1a64981a9 (diff) | |
| download | opencode-d127a1c4ebe326344dc77fe3d136c033da6031fd.tar.gz opencode-d127a1c4ebe326344dc77fe3d136c033da6031fd.zip | |
feat: 0-255 color support in custom themes
Diffstat (limited to 'internal/tui/theme/manager.go')
| -rw-r--r-- | internal/tui/theme/manager.go | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/internal/tui/theme/manager.go b/internal/tui/theme/manager.go index 59d8c8644..5a5c791fb 100644 --- a/internal/tui/theme/manager.go +++ b/internal/tui/theme/manager.go @@ -202,6 +202,54 @@ func LoadCustomTheme(customTheme map[string]any) (Theme, error) { theme.DiffAddedLineNumberBgColor = adaptiveColor case "diffremovedlinenumberbg": theme.DiffRemovedLineNumberBgColor = adaptiveColor + case "syntaxcomment": + theme.SyntaxCommentColor = adaptiveColor + case "syntaxkeyword": + theme.SyntaxKeywordColor = adaptiveColor + case "syntaxfunction": + theme.SyntaxFunctionColor = adaptiveColor + case "syntaxvariable": + theme.SyntaxVariableColor = adaptiveColor + case "syntaxstring": + theme.SyntaxStringColor = adaptiveColor + case "syntaxnumber": + theme.SyntaxNumberColor = adaptiveColor + case "syntaxtype": + theme.SyntaxTypeColor = adaptiveColor + case "syntaxoperator": + theme.SyntaxOperatorColor = adaptiveColor + case "syntaxpunctuation": + theme.SyntaxPunctuationColor = adaptiveColor + case "markdowntext": + theme.MarkdownTextColor = adaptiveColor + case "markdownheading": + theme.MarkdownHeadingColor = adaptiveColor + case "markdownlink": + theme.MarkdownLinkColor = adaptiveColor + case "markdownlinktext": + theme.MarkdownLinkTextColor = adaptiveColor + case "markdowncode": + theme.MarkdownCodeColor = adaptiveColor + case "markdownblockquote": + theme.MarkdownBlockQuoteColor = adaptiveColor + case "markdownemph": + theme.MarkdownEmphColor = adaptiveColor + case "markdownstrong": + theme.MarkdownStrongColor = adaptiveColor + case "markdownhorizontalrule": + theme.MarkdownHorizontalRuleColor = adaptiveColor + case "markdownlistitem": + theme.MarkdownListItemColor = adaptiveColor + case "markdownlistitemenum": + theme.MarkdownListEnumerationColor = adaptiveColor + case "markdownimage": + theme.MarkdownImageColor = adaptiveColor + case "markdownimagetext": + theme.MarkdownImageTextColor = adaptiveColor + case "markdowncodeblock": + theme.MarkdownCodeBlockColor = adaptiveColor + case "markdownlistenumeration": + theme.MarkdownListEnumerationColor = adaptiveColor default: slog.Warn("Unknown color key in custom theme", "key", key) } |
