Skip to content

feat: add catppuccin theme support#59

Merged
textfuel merged 7 commits intotextfuel:mainfrom
nick4eva:add-catppuccin-theme-support
Apr 30, 2026
Merged

feat: add catppuccin theme support#59
textfuel merged 7 commits intotextfuel:mainfrom
nick4eva:add-catppuccin-theme-support

Conversation

@nick4eva
Copy link
Copy Markdown
Contributor

What

Add catppuccin (https://github.com/catppuccin) themes support.

Why

I'd like to have themes support so I can use my favourite theme.

How to test

Set gui.theme to one of supported catppuccin themes or default.

Closes #58

@nick4eva nick4eva requested a review from textfuel as a code owner April 27, 2026 20:28
Copy link
Copy Markdown
Owner

@textfuel textfuel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR! Huge refactor on the color system - really appreciate that. I have left a few comments to discuss

Comment thread pkg/tui/theme/theme.go
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a duplicated palette in authorcolor.go. Could we pick one source of truth between it and your theme.go? I would prefer keeping yours and dropping authorcolor.go

Comment thread pkg/tui/theme/theme.go
Comment on lines +186 to 200
func SetTheme(name string) error {
switch name {
case "", "default":
Default = defaultTheme()
case "catppuccin-latte":
Default = catppuccinLatte()
case "catppuccin-frappe":
Default = catppuccinFrappe()
case "catppuccin-macchiato":
Default = catppuccinMacchiato()
case "catppuccin-mocha":
Default = catppuccinMocha()
default:
return fmt.Errorf("unknown theme: %q", name)
}
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider using https://github.com/catppuccin/go so we'd have all the Catppuccin flavors and no hardcoded colors.
Bonus: the lib also exposes contrast helpers, which solves the Latte readability issue (white-on-light-gray on selected items)
Not blocking

Comment thread pkg/tui/components/jqlhighlight.go Outdated
)
// These are functions so they pick up the active theme's colors.
func jqlFieldStyle() lipgloss.Style { return lipgloss.NewStyle().Foreground(theme.ColorBlue) }
func jqlKeywordStyle() lipgloss.Style { return lipgloss.NewStyle().Foreground(lipgloss.Color("5")) }
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like a few colors are missing from the palette.
Migrating to the catppuccin/go lib would cover this automatically.
Was there a reason for skipping them, or just oversight?

Comment thread pkg/tui/components/createform.go Outdated
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few package-level styles are evaluated at init time, before SetTheme runs, so they capture the default ANSI colors and never pick up the active theme:

  • pkg/tui/components/createform.go:1098 — noneStyle
  • pkg/tui/views/infofields.go:255 — noneStyle
  • pkg/tui/views/detail.go:663 — urlStyle

Same root cause as the var to func conversion you already did in jqlhighlight.go. Could we apply the same fix here?

func noneStyle() lipgloss.Style {
  return lipgloss.NewStyle().Foreground(theme.ColorGray)
}

@nick4eva
Copy link
Copy Markdown
Contributor Author

Thanks for feedback!
Will have a look.

@nick4eva
Copy link
Copy Markdown
Contributor Author

Addressed comments.
Re-review please.

these needed to be re-generated every time go.mod changed
i'll add it into Contributing.md
Copy link
Copy Markdown
Owner

@textfuel textfuel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks awesome! One last minor comment and I'll release this!

Comment thread README.md Outdated
@nick4eva
Copy link
Copy Markdown
Contributor Author

Applied suggestion.

@textfuel textfuel merged commit 23b6d49 into textfuel:main Apr 30, 2026
2 checks passed
@nick4eva nick4eva deleted the add-catppuccin-theme-support branch April 30, 2026 10:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add support for catppuccin themes

2 participants