Skip to content

feat(theme): write and validate a theme's syntax and pair - #79

Merged
omartelo merged 1 commit into
mainfrom
feat/theme-syntax-pair
Oct 15, 2026
Merged

omartelo merged 1 commit into
mainfrom
feat/theme-syntax-pair

Conversation

@omartelo

Copy link
Copy Markdown
Collaborator

The theme skill learns the two optional keys the native window reads.

  • syntax: the skill ports a palette's code colors from its editor theme (a JetBrains color scheme or a VS Code tokenColors) into highlighting tags, and names the tags lich gives Java's enum constants, annotations, fields and import paths.
  • pair: the skill pairs a palette's light and dark variants so lich native follows the desktop between them with Auto light/dark on.

validate.mjs previously ignored syntax. It now checks both keys as lich's validateSyntax and checkPairs do:

  • an unknown highlighting tag or modifier;
  • a style with no color and no font style;
  • a color outside the app color rule;
  • a theme that is its own pair;
  • a pair of the same scheme, whether a sibling in the pack or bundled light/dark.

tests/lich-ref moves from v0.65.0 to omartelo/lich@c42e0ea2, the commit whose template shows pair beside syntax. No lich release ships them yet, which is the unreleased-contract exception in CLAUDE.md. That commit is on feat/native-ui, not a merge on main. The hook fixtures are byte-identical at that ref; only skills/theme/template.json moved. When a lich release ships syntax and pair, the ref goes back to its tag.

Tests: node --test tests/*.test.mjs, 427 pass, 8 of them new for the validator. The published packs (everforest, catppuccin, rose-pine, eldritch, lotus, bluloco) validate clean.

The skill ports a palette's code colors into syntax and pairs a palette's
light and dark variants. validate.mjs checks syntax tags, modifiers and
styles, and pairs (own id, same scheme in the pack or bundled), as lich's
validateSyntax and checkPairs do. tests/lich-ref pins the lich commit whose
template shows both, until a lich release ships them.
@omartelo
omartelo merged commit f52b1fc into main Oct 15, 2026
2 checks passed
@omartelo omartelo mentioned this pull request Oct 15, 2026
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.

1 participant