Skip to content

Redesign Chroma around configurable comptime themes - #6

Merged
adia-dev merged 1 commit into
mainfrom
agent/comptime-themes
Aug 1, 2026
Merged

Redesign Chroma around configurable comptime themes#6
adia-dev merged 1 commit into
mainfrom
agent/comptime-themes

Conversation

@adia-dev

@adia-dev adia-dev commented Aug 1, 2026

Copy link
Copy Markdown
Owner

What changed

  • redesigned the formatter around explicit namespaced directives such as {#red,bold}
  • added typed ZON themes, semantic styles, configurable syntax, ANSI/plain variants, and terminal capability detection
  • replaced repeated comptime string concatenation with an exact-size two-pass renderer
  • expanded color, effect, reset, compile-error, UTF-8, and stress coverage
  • added a runnable configurable example, real terminal screenshot, benchmark, migration guide, and comptime/runtime table
  • updated package metadata and CI for Zig 0.16.0 across Linux, macOS, and Windows

Why

The old parser could confuse Chroma directives with Zig format fields, produced redundant resets, and was difficult to extend safely. This v0.2 redesign keeps the library comptime-first while making configuration, diagnostics, and cross-platform behavior much clearer.

This is a breaking syntax update: {red} becomes {#red}, with a migration table in the README.

Validation

  • zig fmt --check .
  • zig build test
  • zig build test -Doptimize=ReleaseFast
  • zig build
  • zig build benchmark
  • cross-builds for x86_64/aarch64 Linux, x86_64 Windows, and aarch64 macOS
  • vhs validate docs/chroma.tape

@adia-dev
adia-dev marked this pull request as ready for review August 1, 2026 21:20
@adia-dev
adia-dev merged commit f8fecfe into main Aug 1, 2026
8 checks passed
@adia-dev
adia-dev deleted the agent/comptime-themes branch August 1, 2026 21:21
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