-
Notifications
You must be signed in to change notification settings - Fork 1
Closed
Labels
enhancementNew feature or requestNew feature or request
Description
Tree-sitter-based syntax highlighting for fenced code blocks in the TUI chat widget.
Current state: Code blocks render with a single flat color (theme.code_block).
Goal: Language-aware syntax coloring using tree-sitter grammars already in the workspace.
Architecture
SyntaxHighlighterincrates/zeph-tui/src/highlight.rswrapstree-sitter-highlightSyntaxThememaps tree-sitter capture names (keyword, string, comment, etc.) to ratatui stylesMdRenderercalls highlighter when rendering code block text with a known language tagLazyLock<SyntaxHighlighter>for zero-cost initialization- Feature-gated grammars:
lang-rust,lang-python,lang-js,lang-config
Languages (MVP)
Rust, Python, JavaScript, TypeScript, JSON, TOML, Bash
Sub-issues
- M23-A: SyntaxTheme and highlight.rs scaffolding #345 Phase A: SyntaxTheme + highlight.rs scaffolding
- M23-B: Integrate SyntaxHighlighter into MdRenderer #346 Phase B: Integrate into MdRenderer
- M23-C: Add highlight queries for MVP languages #347 Phase C: Highlight queries for all MVP languages
Plan
.local/plan/m23-syntax-highlighting.md
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request