NS5 slice: Add source-patched Tree-sitter highlighting v1 #28

Closed
opened 2026-06-20 23:28:18 +00:00 by tmk241 · 1 comment
Owner

OBJECTIVE: Integrate one language grammar and highlight query through a source-patched registry with plain-text fallback.

AUTHORITY: Parent #5 NS5: Syntax and LSP coding intelligence; PRODUCT.md; REQUIREMENTS.md (PRODUCT.md; req: coding/002-003; req: ui/002; req: governance/002).

AGENT AUTHORITY:

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

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

SCOPE: The smallest source/docs/tests needed to make this behavior real and verified.

BOUNDARIES: No runtime grammar install or theme system.

ACCEPTANCE: Render tests for a fixture source file produce expected highlight spans/classes and fallback gracefully when unsupported.

VERIFICATION: Run the cheapest command that proves acceptance. Include regular tests for the intended payoff and adversarial tests for realistic failure, boundary, or regression cases. If no implementation test command exists yet, create/record the canonical command in AGENTS.md as part of the slice.

BLOCKERS: none

GOAL: Implement this vertical slice to the ACCEPTANCE above, keep the repo clean, cite relevant req: anchors in code/tests where applicable, and close only after verification passes.

OBJECTIVE: Integrate one language grammar and highlight query through a source-patched registry with plain-text fallback. AUTHORITY: Parent #5 `NS5: Syntax and LSP coding intelligence`; PRODUCT.md; REQUIREMENTS.md (PRODUCT.md; req: coding/002-003; req: ui/002; req: governance/002). AGENT AUTHORITY: - Delivery authority: local-commit - Tracker authority: this issue may be commented and closed when acceptance passes. - Handoff state: committed clean, tracker commented/closed. PARENT: #5 via explicit issue link and parent checklist. SCOPE: The smallest source/docs/tests needed to make this behavior real and verified. BOUNDARIES: No runtime grammar install or theme system. ACCEPTANCE: Render tests for a fixture source file produce expected highlight spans/classes and fallback gracefully when unsupported. VERIFICATION: Run the cheapest command that proves acceptance. Include regular tests for the intended payoff and adversarial tests for realistic failure, boundary, or regression cases. If no implementation test command exists yet, create/record the canonical command in AGENTS.md as part of the slice. BLOCKERS: none GOAL: Implement this vertical slice to the ACCEPTANCE above, keep the repo clean, cite relevant `req:` anchors in code/tests where applicable, and close only after verification passes.
tmk241 added this to the v1 milestone 2026-06-20 23:28:18 +00:00
tmk241 added the sliceready-for-agentgoal labels 2026-06-20 23:28:18 +00:00
Author
Owner

Implemented in commit a90c35e542 (Add source-patched syntax profiles).

Verification:

  • zig fmt src/main.zig src/syntax.zig src/tui.zig: pass
  • zig build test: pass
  • zig build: pass
  • zig build run -- --help: pass
  • redgate lint / health: pass

Regular tests: source-patched Zig syntax profile emits deterministic highlight spans/classes for keywords, builtins, strings, comments, and numbers; syntax rows include byte ranges and preview tokens; TUI syntax_spans zig renders the rows in the shared panel surface. Plain text has an explicit fallback row.
Adversarial tests: unsupported languages are rejected and do not corrupt the current editor buffer.

Boundary: one source-patched local Zig/text profile registry and panel-visible span rows only. No runtime grammar installer, external parser dependency, theme system, semantic tokens, LSP, or background parser added.

Implemented in commit a90c35e5424e (Add source-patched syntax profiles). Verification: - zig fmt src/main.zig src/syntax.zig src/tui.zig: pass - zig build test: pass - zig build: pass - zig build run -- --help: pass - redgate lint / health: pass Regular tests: source-patched Zig syntax profile emits deterministic highlight spans/classes for keywords, builtins, strings, comments, and numbers; syntax rows include byte ranges and preview tokens; TUI `syntax_spans zig` renders the rows in the shared panel surface. Plain text has an explicit fallback row. Adversarial tests: unsupported languages are rejected and do not corrupt the current editor buffer. Boundary: one source-patched local Zig/text profile registry and panel-visible span rows only. No runtime grammar installer, external parser dependency, theme system, semantic tokens, LSP, or background parser added.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: tmk241/mim#28