Crate syntect [−] [src]
Welcome to the syntect docs. These are still a work in progress but a lot of the important things have been documented already.
Much more info about syntect is available on the Github Page.
May I suggest that you start by reading the
Readme.md file in the main repo.
Once you're done with that you can look at the docs for
and for the
Almost everything in syntect is divided up into either the
for turning text into text annotated with scopes, and the
for turning annotated text into styled/coloured text.
Some docs have example code but a good place to look is the
syncat example as well as the source code
easy module in
easy.rs as that shows how to plug the various parts together for common use cases.
Methods for dumping serializable structs to a compressed binary format These are used to load and store the dumps used for fast startup times.
API wrappers for common use cases like highlighting strings and files without caring about intermediate semantic representation and caching.
Everything having to do with turning parsed text into styled text.
You might want to check out
Rendering highlighted code as HTML+CSS
Everything about parsing text into text annotated with scopes.
The most important struct here is
Convenient utility methods, mostly for printing
Common error type used by syntax and theme loading