NS9 slice: Theme syntax highlighting with newed highlight groups #60

Closed
opened 2026-06-21 09:15:36 +00:00 by tmk241 · 1 comment
Owner

OBJECTIVE: Syntax-highlighted source uses newed-compatible highlight group colors while preserving mim’s source-profile and trace-backed rendering model.

AUTHORITY: Parent #57; /opt/repositories/newed/newed-theme/src/default_theme.rs highlight group mappings; highlight.rs; mim src/syntax.zig; req: coding/002, ui/001-002, testing/001-004.

AGENT AUTHORITY:

  • Delivery authority: local-commit
  • Tracker authority: this issue may be commented and closed when acceptance passes; parent #57 may be commented/checklisted.
  • Handoff state: committed clean, tracker commented/closed.

PARENT: #57 via explicit issue link and parent checklist.

SCOPE: Map mim syntax span classes to semantic theme tokens/highlight groups; update renderer/tests for highlighted Zig/source fixture; add fallback behavior for unknown classes.

BOUNDARIES: Do not change parser/highlighter semantics beyond color application. Do not require Tree-sitter for files that currently render without it.

ACCEPTANCE:

  • Existing syntax spans render with style classes derived from newed highlight groups.
  • Keywords/functions/types/strings/numbers/comments/operators/variables are distinguishable without excessive contrast noise.
  • Unknown highlight classes fall back safely to normal text or a documented token.
  • Style nesting and resets do not corrupt surrounding plain text.
  • 16-color/mono modes remain legible and do not encode critical information only by color.

VERIFICATION:

  • zig build test
  • Syntax render fixture tests for representative source, unknown class fallback, style reset, 256/16/mono adaptation.
  • zig build v1-smoke

BLOCKERS: depends on theme token/adaptation support.

OBJECTIVE: Syntax-highlighted source uses newed-compatible highlight group colors while preserving mim’s source-profile and trace-backed rendering model. AUTHORITY: Parent #57; `/opt/repositories/newed/newed-theme/src/default_theme.rs` highlight group mappings; `highlight.rs`; mim `src/syntax.zig`; req: coding/002, ui/001-002, testing/001-004. AGENT AUTHORITY: - Delivery authority: local-commit - Tracker authority: this issue may be commented and closed when acceptance passes; parent #57 may be commented/checklisted. - Handoff state: committed clean, tracker commented/closed. PARENT: #57 via explicit issue link and parent checklist. SCOPE: Map mim syntax span classes to semantic theme tokens/highlight groups; update renderer/tests for highlighted Zig/source fixture; add fallback behavior for unknown classes. BOUNDARIES: Do not change parser/highlighter semantics beyond color application. Do not require Tree-sitter for files that currently render without it. ACCEPTANCE: - Existing syntax spans render with style classes derived from newed highlight groups. - Keywords/functions/types/strings/numbers/comments/operators/variables are distinguishable without excessive contrast noise. - Unknown highlight classes fall back safely to normal text or a documented token. - Style nesting and resets do not corrupt surrounding plain text. - 16-color/mono modes remain legible and do not encode critical information only by color. VERIFICATION: - `zig build test` - Syntax render fixture tests for representative source, unknown class fallback, style reset, 256/16/mono adaptation. - `zig build v1-smoke` BLOCKERS: depends on theme token/adaptation support.
tmk241 added the sliceready-for-agentgoal labels 2026-06-21 09:15:36 +00:00
Author
Owner

Closing receipt for #60.

Implemented in local commit a9b4eff (Color syntax spans with newed palette):

  • Existing source-patched Zig syntax spans now render with newed palette highlight colors.
  • Mapped keyword, builtin/type, string, comment, and number classes to semantic colors.
  • Search/selection/cursor styles take precedence over syntax highlighting.
  • Plain text without spans remains on the normal newed themed text path.
  • Terminal E2E artifact role detection now tracks syntax color roles.

Verification:

  • zig build
  • zig build test
  • zig build terminal-e2e (new syntax-highlight-colors scenario)
  • zig build run -- --help
  • zig build --prefix /tmp/mim-install verify-install-code
  • redgate list /opt/repositories/mim/REQUIREMENTS.md && redgate lint /opt/repositories/mim/REQUIREMENTS.md && redgate health /opt/repositories/mim/REQUIREMENTS.md
Closing receipt for #60. Implemented in local commit `a9b4eff` (`Color syntax spans with newed palette`): - Existing source-patched Zig syntax spans now render with newed palette highlight colors. - Mapped keyword, builtin/type, string, comment, and number classes to semantic colors. - Search/selection/cursor styles take precedence over syntax highlighting. - Plain text without spans remains on the normal newed themed text path. - Terminal E2E artifact role detection now tracks syntax color roles. Verification: - `zig build` ✅ - `zig build test` ✅ - `zig build terminal-e2e` ✅ (new `syntax-highlight-colors` scenario) - `zig build run -- --help` ✅ - `zig build --prefix /tmp/mim-install verify-install-code` ✅ - `redgate list /opt/repositories/mim/REQUIREMENTS.md && redgate lint /opt/repositories/mim/REQUIREMENTS.md && redgate health /opt/repositories/mim/REQUIREMENTS.md` ✅
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: tmk241/mim#60