logoalt Hacker News

teo_zeroyesterday at 6:15 AM5 repliesview on HN

Sorry, but I can't understand what this actually is. A library, a stand-alone tool, a Rust crate? What users does it target? Text editors, website creators?


Replies

GolDDranksyesterday at 9:04 AM

It's a Rust library (comprised of a bunch of crates) that wraps a high-performance, high-accuracy syntax highlighter (called Tree-sitter) with vetted support for almost 100 programming/markup languages.

You can use it as a normal Rust library, or you can use the JavaScript/WASM wrapper to highlight source code on a web page.

show 2 replies
jasonjmcgheeyesterday at 6:36 AM

GitHub repo is a bit more helpful, but users or building of text editors that use tree-sitter.

Or... website text editors which historically have had imperfect syntax highlighting.

Notice the Zed sponsorship.

https://github.com/bearcove/arborium

show 1 reply
discord9yesterday at 7:05 AM

I think this gives some context?:https://fasterthanli.me/articles/my-gift-to-the-rust-docs-te... TLDR: for rust doc highlighting stuff in document

Rodmineyesterday at 6:25 AM

Not for you then. You don't need to understand everything.