#syntax-highlighting #highlighter #colouring #parser

unmaintained syntect-no-panic

temporary fork of Syntect (don't use)

1 stable release

4.6.1 Jan 23, 2022

#5 in #colouring

Download history 295/week @ 2023-11-19 251/week @ 2023-11-26 279/week @ 2023-12-03 227/week @ 2023-12-10 339/week @ 2023-12-17 291/week @ 2023-12-24 341/week @ 2023-12-31 204/week @ 2024-01-07 191/week @ 2024-01-14 124/week @ 2024-01-21 249/week @ 2024-01-28 308/week @ 2024-02-04 225/week @ 2024-02-11 341/week @ 2024-02-18 389/week @ 2024-02-25 317/week @ 2024-03-03

1,312 downloads per month
Used in broot

MIT license

1MB
7K SLoC

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.


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

~0.9–4MB
~83K SLoC