Module syntect::highlighting

source ·
Expand description

Everything having to do with turning parsed text into styled text. You might want to check out Theme for its handy text-editor related settings like selection color, ThemeSet for loading themes, as well as things starting with Highlight for how to highlight text.

Structs

RGBA color, these numbers come directly from the theme so for now you might have to do your own color space conversion if you are outputting a different color space from the theme. This can be a problem because some Sublime themes use sRGB and some don’t. This is specified in an attribute syntect doesn’t parse yet.
This can be a combination of BOLD, UNDERLINE and ITALIC
Highlights a line of parsed code given a HighlightState and line of changes from the parser.
Keeps a stack of scopes and styles as state between highlighting different lines. If you are highlighting an entire file you create one of these at the start and use it all the way to the end.
Basically a wrapper around a Theme preparing it to be used for highlighting. This is part of the API to preserve the possibility of caching matches of the selectors of the theme on various scope paths or setting up some kind of accelerator structure.
A single selector consisting of a stack to match and a possible stack to exclude from being matched. You probably want ScopeSelectors which is this but with union support.
A selector set that matches anything matched by any of its component selectors. See The TextMate Docs for how these work.
The foreground, background and font style
A change to a Style applied incrementally by a theme rule.
A theme parsed from a .tmTheme file. Contains fields useful for a theme list as well as settings for styling your editor.
A component of a theme meant to highlight a specific thing (e.g string literals) in a certain way.
Various properties meant to be used to style a text editor. Basically all the styles that aren’t directly applied to text like selection color. Use this to make your editor UI match the highlighted text.

Enums

An error parsing a settings file