Arborium - Batteries-included tree-sitter grammar collection
This crate provides:
- Re-exports of individual grammar crates via feature flags
- HTML rendering with CSS classes for syntax highlighting
- WASM support with custom allocator (automatically enabled on WASM targets)
Usage
Enable the languages you need via feature flags:
[]
= { = "0.1", = ["lang-rust", "lang-python"] }
Or enable all languages:
[]
= { = "0.1", = ["all-languages"] }
Example
use ;
use ;
// Create a highlight configuration for Rust
let mut config = new.unwrap;
config.configure;
// Render to HTML
let mut highlighter = new;
let mut output = Vecnew;
render.unwrap;