1 stable release

5.2.0 Dec 30, 2024

#5 in #colouring

Download history 105/week @ 2024-12-25 297/week @ 2025-01-01

402 downloads per month

MIT license

1MB
8K SLoC

syntect-5-no-panic

This is a fork of Syntect.

This fork is very similar to the original version 5.2 of Syntect, but modified to return errors or behave differently instead of panicking in some cases of failing syntaxic colorings or in case of regexes not compatible with the selected engine.

Please try to use the original Syntect instead of this temporary fork.

There's no project to add features: as soon as I can use the normal syntect, this repository will be considered obsolete.

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


lib.rs:

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.

Dependencies

~1–10MB
~113K SLoC