1 stable release

4.6.1 Jan 23, 2022

#5 in #colouring

Download history 272/week @ 2024-03-13 280/week @ 2024-03-20 230/week @ 2024-03-27 220/week @ 2024-04-03 208/week @ 2024-04-10 208/week @ 2024-04-17 378/week @ 2024-04-24 362/week @ 2024-05-01 223/week @ 2024-05-08 205/week @ 2024-05-15 150/week @ 2024-05-22 313/week @ 2024-05-29 209/week @ 2024-06-05 235/week @ 2024-06-12 180/week @ 2024-06-19 195/week @ 2024-06-26

852 downloads per month
Used in broot

MIT license


This is a fork of Syntect.

This fork is very similar to the original version 4.6 of Syntect, the last non yanked version of Syntect at time of writing, but modified to return errors instead of panicking in some cases of failing syntaxic colorings.

Please try to use the original Syntect instead of this temporary fork. There's no project to maintain it for a long time nor for adding features: as soon as Syntect 5 is released without cases of panics and the applications using this fork are ported, it will be terminated.

If you really feel like you need to use this, contact @dystroy on the Miaou chat.


Welcome to the syntect docs.

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 parsing::SyntaxSet and for the easy module.

Almost everything in syntect is divided up into either the parsing module for turning text into text annotated with scopes, and the highlighting module for turning annotated text into styled/colored text.

Some docs have example code but a good place to look is the syncat example as well as the source code for the easy module in easy.rs as that shows how to plug the various parts together for common use cases.


~119K SLoC