feat(highlight): add markdown syntax highlighting with injection

Add tree-sitter-md for markdown parsing with injection support for
fenced code blocks. Code inside markdown code fences (```rust, ```bash,
etc.) is now fully syntax highlighted.

Key fix: Use `#set! injection.include-children` directive in the
injection query to override tree-sitter-md's internal tokenization
of code_fence_content, allowing proper language injection.

- Add tree-sitter-md v0.5.2 dependency
- Add Markdown variant to Language enum (md, markdown aliases)
- Create queries/md-highlights.scm (minimal markdown highlights)
- Create queries/md-injections.scm (with include-children directive)
- Add test: test_markdown_injection_rust
This commit is contained in:
Timothy DeHerrera
2026-01-31 16:41:11 -07:00
parent 69cd81621f
commit 8c54882118
6 changed files with 92 additions and 1 deletions

View File

@@ -12,7 +12,7 @@ sukr highlights code blocks at build time using Tree-sitter. No client-side Java
Use fenced code blocks with a language identifier:
````markdown
````md
```rust
fn main() {
println!("Hello, world!");