feat(tui): implement syntax highlighting for code blocks
Add syntax.rs with syntect integration: - SyntaxHighlighter with configurable themes - Support for Rust, Python, JavaScript, TypeScript, etc. - Language alias normalization (js→JavaScript, py→Python) - highlight_code() and render_code_block() helpers - Global syntax/theme sets with lazy loading - Fallback for unknown languages - 10 unit tests Dependencies added: syntect, once_cell Closes #12 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
29d1335c7e
commit
04f7bc897e
4 changed files with 284 additions and 0 deletions
|
|
@ -37,6 +37,7 @@ crossterm = { version = "0.29.0", features = ["bracketed-paste", "event-stream"]
|
|||
textwrap = "0.16"
|
||||
unicode-width = "0.2"
|
||||
pulldown-cmark = "0.12"
|
||||
syntect = "5"
|
||||
|
||||
# CLI
|
||||
clap = { version = "4", features = ["derive"] }
|
||||
|
|
@ -59,3 +60,4 @@ reqwest = { version = "0.12", features = ["json", "stream"] }
|
|||
# Utilities
|
||||
chrono = { version = "0.4", features = ["serde"] }
|
||||
uuid = { version = "1", features = ["v4", "serde"] }
|
||||
once_cell = "1"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue