Repository navigation
feat(cli): named theme palettes, theme set persisted in config - #500
Merged
Merged
Conversation
`kates theme` only previewed palettes: nothing read a theme setting, so every command rendered the default colors whatever was picked. pkg/theme now holds the palettes as complete token sets (every role with a light and a dark shade) and picks one at start-up: KATES_THEME, else `theme:` in ~/.kates.yaml, else "default". The package tokens come from that palette, so all CLI styles follow it; the choice is fixed for the life of the process. - default keeps the exact Kates values, pinned by a test. - aurora is new, tuned for light and dark terminals. - dracula, gruvbox, monokai and solarized use their dark colors on dark terminals and keep the default shades on light ones, where they are unreadable. - `kates theme set <name>` saves the theme in ~/.kates.yaml without touching contexts; setting default removes the key, and a KATES_THEME override is pointed out. - `kates theme list` marks the active theme and warns when the requested one is not built in; `preview` shows every role and sample output. - Completion for preview and set comes from theme.Names().
bmscomp
force-pushed
the
feat/cli-theme-palettes
branch
from
October 25, 2026 21:24
5536499 to
dff63a9
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
pkg/themegets named palettes (palettes.go), each a complete token set with a light and a dark shade per role.tokens.goreads its colours from the palette chosen at start-up, so every CLI style follows it; the choice is fixed for the life of the process.KATES_THEME, elsetheme:in~/.kates.yaml, elsedefault. An unknown name falls back todefault.default: the Kates look, values unchanged.aurora: new, teal/violet, tuned for light and dark terminals.dracula,gruvbox,monokai,solarized: their colours on dark terminals; light terminals keep the default shades, where those schemes are unreadable.kates theme set <name>writestheme:to~/.kates.yaml(newConfig.Themefield,omitempty) without touching contexts. Settingdefaultremoves the key; aKATES_THEMEthat overrides it is pointed out.kates theme listmarks the active theme and warns when the requested one is not built in;previewshows every role and sample output.theme previewandtheme setcomes fromtheme.Names().Why
kates themeonly previewed palettes: nothing read a theme setting, so every command rendered the default colours whatever was picked.Reviewer notes
palettes_test.gopins that.~/.kates.yamlis ignored by the theme lookup (the CLI's own config loading still reports it).go build ./...,go vet,go test ./pkg/theme/ ./cmd/pass;golangci-lint run --new-from-rev=HEADreports 0 new issues.