Skip to content

Releases: trishume/syntect

v5.2.0

07 Feb 09:45
1651081
Compare
Choose a tag to compare

Improvements

  • Eliminate syntect library's dependency on serde's "derive" feature. Increases build parallelism.
  • Add parsing of gutterSettings.

Dependencies

  • Update regex-syntax to 0.8.

v5.1.0

31 Jul 16:40
b7531a8
Compare
Choose a tag to compare

Improvements

  • Fix how syntect::util::split_at() handles multi-byte characters
  • Allow case insensitive search for .tmtheme paths
  • impl PartialEq for Theme

Dependencies

  • Upgrade fancy-regex to 0.11
  • Upgrade regex-syntax to 0.7
  • Replace lazy_static with once_cell

Other

  • Change MSRV policy to "last three stable versions"
  • Make Debug impl of syntect::highlighting::Color less verbose

Breaking changes for improved startup time and error handling!

04 May 05:21
Compare
Choose a tag to compare

Thanks to @Enselic for basically all the work to make this release happen!

Breaking changes

  • Lazy-load syntaxes to significantly improve startup time. This changes the binary format of syntax dump files.
  • Remove ContextId::new() from public API to support lazy-loading of syntaxes
  • Rename HighlightLines::highlight() to HighlightLines::highlight_line() to make it clear that the function takes one line at a time
  • Make plist dependency (used for loading themes) optional via new plist-load feature
  • Remove obsolete dump-load-rs and dump-create-rs features that has been identical to dump-load and dump-create for two years
  • Remove deprecated items ThemeSettings::highlight_foreground, ThemeSettings::selection_background, ClassedHTMLGenerator::new, ClassedHTMLGenerator::parse_html_for_line, html::css_for_theme, html::tokens_to_classed_html and html::tokens_to_classed_spans
  • Mark all error enums as #[non_exhaustive]
  • These functions have been changed to return a Result to allow propagation of errors:
    • html::ClassedHTMLGenerator::parse_html_for_line_which_includes_newline
    • html::append_highlighted_html_for_styled_line
    • html::css_for_theme_with_class_style
    • html::highlighted_html_for_string
    • html::line_tokens_to_classed_spans
    • html::styled_line_to_highlighted_html
    • parsing::ParseState::parse_line
    • parsing::ScopeStack::apply
    • parsing::ScopeStack::apply_with_hook
    • parsing::syntax_definition::Context::match_at
    • parsing::syntax_definition::ContextReference::id
    • parsing::syntax_definition::ContextReference::resolve

Other changes

  • Fall back to Plain Text if a referenced syntax is missing
  • Add support for hidden_file_extensions key in syntaxes.
  • Implement Error and Display for all error enums by using thiserror
  • Replace lazycell with once_cell to fix crash on lazy initialization
  • Add ScopeRangeIterator
  • Add CI check for Minimum Supported Rust Version. This is currently Rust 1.53.
  • Make looking up a syntax by extension use case-insensitive comparison
  • Make from_dump_file() ~15% faster
  • Blend alpha value on converting colors to ANSI color sequences
  • Fix sample code in documentation to avoid double newlines
  • Fix lots of build warnings and lints
  • Add Criterion benchmarks for a whole syntect pipeline and for from_dump_file()

Patch of v4.7.0 without the semver violations that broke things

02 Jan 23:24
Compare
Choose a tag to compare

See the release notes for v4.7.0, this release removes a new Cargo feature which constituted a semver violation:

  • Remove 'plist-load' feature again due to semver violation. #403

Much faster startup through lazy-loading, and much more!

26 Dec 04:48
Compare
Choose a tag to compare

Big release this time thanks to tons of fantastic contributions from @Enselic, this release was basically all him! The headline feature is much faster startup time due to lazy-loading at the syntax level.

  • Lazy-load syntaxes to significantly improve startup time
  • Remove ContextId::new() from public API to support lazy-loading of syntaxes. This is technically a breaking change but I have no idea why I made this API public and I'm pretty sure zero people have used it.
  • Add ScopeRangeIterator
  • Add CI check for Minimum Supported Rust Version. This is currently Rust 1.51.
  • Make 'plist' dependency (used for loading themes) optional via new 'plist-load' feature
  • Make looking up a syntax by extension use case-insensitive comparison
  • Make from_dump_file() ~15% faster
  • Blend alpha value on converting colors to ANSI color sequences
  • Fix sample code in documentation to avoid double newlines
  • Fix lots of build warnings and lints
  • Add Criterion benchmarks for a whole syntect pipeline and for from_dump_file()
  • Replace lazycell with once_cell to fix crash on lazy initialization

Fixes and new APIs

01 Aug 19:13
Compare
Choose a tag to compare
  • Add html::line_tokens_to_classed_spans to also take a mutable ScopeStack, deprecate tokens_to_classed_spans, to avoid panics and incorrect highlighting.
  • Derive Hash for Color and Style
  • Add find_unlinked_contexts to SyntaxSet
  • Add syntaxes method to SyntaxSetBuilder
  • Bump fancy-regex to v0.7 and yaml-rust to v0.4.5

A more correct classed HTML function

09 Dec 23:33
Compare
Choose a tag to compare
  • Added a new function for producing classed HTML which handles newlines correctly and deprecated old one. #307

Cross-thread errors (+ feature and html fixes)

20 Aug 02:50
Compare
Choose a tag to compare
  • Errors are now Send + Sync + 'static #304

I also forgot to make a Github release for v4.3.0 but released it on crates.io so belatedly in v4.3.0:

  • Fixes unnecesary dependency of the html feature on the assets feature. #300
  • Adds ability to add prefixes to html module CSS class names. #296

New onig and plist versions

23 May 17:59
Compare
Choose a tag to compare
  • Updates to new versions of onig and plist. The new onig version doesn't require bindgen thus making compilation easier. #293

Fix a bug that could panic with some syntaxes

21 Apr 00:53
Compare
Choose a tag to compare
  • Properly handle backreferences in included contexts #288