Skip to content

Add syntect highlighter#678

Merged
dhardy merged 9 commits intomasterfrom
push-qvnxkzltnmoz
Mar 8, 2026
Merged

Add syntect highlighter#678
dhardy merged 9 commits intomasterfrom
push-qvnxkzltnmoz

Conversation

@dhardy
Copy link
Collaborator

@dhardy dhardy commented Mar 8, 2026

Adds highlighting support over syntect and enables this in the gallery's Markdown editor and in examples/text-editor.

Performance is a bit slow, especially in debug builds. So far highlighting (re)processes the entire input at once; fixing this (limiting to shown lines) should help.

The syntect (Sublime) highlighter is limited to typical effects: bold (on/off), italic (on/off), underline, text and background colours. It would be nice if it supported a few other things (e.g. a lighter font weight in comments, using the monospace font family within Markdown code blocks) — alas, highlighters don't typically do this.

Known issue: background colours are used everywhere; ideally these should be made transparent and the text background should use the highlighter's theme colours.

@dhardy dhardy force-pushed the push-qvnxkzltnmoz branch from b22b9c3 to da4a8d3 Compare March 8, 2026 09:21
@dhardy dhardy merged commit a7b5c8a into master Mar 8, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant