feat(highlight): implement tree-house syntax highlighting engine

Replace tree-sitter-highlight with Helix's tree-house crate for
advanced syntax highlighting:

- Add tree-house and tree-house-bindings dependencies
- Implement SukrLoader with LanguageLoader trait
- Add hierarchical scope resolution with fallback
  (e.g., keyword.control.conditional → keyword.control → keyword)
- Create custom HTML renderer processing HighlightEvents
- Support all 14 languages with Helix queries
- Handle JS/TS inheritance chain (ecma → _javascript/_typescript)

Benefits:
- Richer semantic highlighting with ~75 scope classes
- Proper language injection support
- Hierarchical theme scopes matching Helix themes
- Foundation for converting Helix TOML themes to CSS
This commit is contained in:
Timothy DeHerrera
2026-02-05 12:04:53 -07:00
parent 136be19533
commit f9a978bdd6
3 changed files with 618 additions and 377 deletions

View File

@@ -12,21 +12,24 @@ thiserror = "2"
walkdir = "2"
# Syntax highlighting
ropey = "1.6"
tree-house = { git = "https://github.com/helix-editor/tree-house", package = "tree-house" }
tree-sitter = "0.26"
tree-sitter-bash = "0.23"
tree-sitter-c = "0.24"
tree-sitter-css = "0.25"
tree-sitter-go = "0.25"
tree-sitter-html = "0.23"
ropey = "1.6"
tree-house = { git = "https://github.com/helix-editor/tree-house", package = "tree-house", default-features = false }
tree-house-bindings = { git = "https://github.com/helix-editor/tree-house", package = "tree-house-bindings", features = [
"tree-sitter-language",
] }
tree-sitter = "0.26"
tree-sitter-bash = "0.23"
tree-sitter-c = "0.24"
tree-sitter-css = "0.25"
tree-sitter-go = "0.25"
tree-sitter-html = "0.23"
tree-sitter-javascript = "0.25"
tree-sitter-json = "0.24"
tree-sitter-nix = "0.3"
tree-sitter-python = "0.25"
tree-sitter-rust = "0.23"
tree-sitter-json = "0.24"
tree-sitter-nix = "0.3"
tree-sitter-python = "0.25"
tree-sitter-rust = "0.23"
tree-sitter-typescript = "0.23"
tree-sitter-yaml = "0.7"
tree-sitter-yaml = "0.7"
# CSS processing
lightningcss = "1.0.0-alpha.70"