Skip to content

Releases: Sublime-Instincts/BetterTwig

v4.0.0: Merge pull request #39 from deathaxe/feat/refactor-syntax

28 Oct 07:26
aeb6874
Compare
Choose a tag to compare

v3.0.3: Merge pull request #35 from deathaxe/fix/preference-names

18 Oct 18:37
4c9713c
Compare
Choose a tag to compare

4142-3.0.3: Merge pull request #35 from deathaxe/fix/preference-names

28 Oct 07:24
4c9713c
Compare
Choose a tag to compare

v3.0.2

29 Jul 16:50
Compare
Choose a tag to compare
don't forget the ternaries

v3.0.1

29 Jul 16:41
Compare
Choose a tag to compare
allow chaining of tests with other logic

Twig v3.0.0

24 Mar 13:25
d597de7
Compare
Choose a tag to compare

Changes you might notice

  • Snippet triggers no longer prefixed with "t".
  • Better contextual suggestions and completions
  • Scopes of the parent context are now completely cleared,
    ensuring clean highlighting of Twig in more contexts.

Potential breaking changes in scopes

  • {% %} is now scoped as meta.statement, {{ }} as meta.expression.
  • The above mentioned scope clearing changes scopes in some cases.

Other improvements and new features

  • Add missing indent rule for elseif.
  • Add some missing snippets
  • Object properties now have the correct scope.
  • Recognize variable declarations, supporting goto definition and symbol list.
  • Support arrow functions, range, spread operators, "only" keyword, etc..
  • More detailed matching in for loops.
  • More detailed matching of test statements ("... is bar").
  • More detailed matching of filters, allowing more context-aware completions.
  • In general improved support for filters.
  • And more... see:
    #31
    #32

Note that 4142 (Nov 10 2022) is the oldest supported build of Sublime Text.

Version 2.1.0 (May 11, 2022)

11 May 09:34
Compare
Choose a tag to compare

This release addresses the following :-

Fixed

  • String scopes are now properly cleared when expressions and statements are present in strings.
  • Fix a bug where ending ) was scoped as punctuation.section.group.begin.twig.
  • Code within verbatim blocks are now, not syntax highlighted anymore (to represent raw plain text).
  • General syntax context name cleanups.

Added

  • Seperated the main syntax and extracted a core Twig syntax. This makes the syntax reusable and could now be used in other markups with little effort.
  • Added a CSS (Twig).sublime-syntax to support embedding Twig expressions in CSS & HTML (Resolves #25)

Issues addressed in this release can be viewed in the 2.1.0 milestone.

Version 2.0.1 (January 20, 2022)

20 Jan 14:35
Compare
Choose a tag to compare

This release addresses the following :-

  • Twig comments not working.
  • Key bindings file not opening from the menu & command palette.

Version 2.0.0 (January 13, 2022)

13 Jan 05:52
Compare
Choose a tag to compare

This release is a major version bump for BetterTwig. There are a ton of improvements & fixes and one minor breaking change.

Breaking Change

The syntax name is changed from Twig.sublime-syntax to HTML (Twig).sublime-syntax. This is done to better reflect the fact that the Twig syntax now extends the HTML syntax to provide highlighting for both Twig & HTML specific code. If you are referring the syntax by its name for any purpose, then please change it to HTML (Twig).sublime-syntax. If you are also getting any error popups for existing open Twig files, then just close all of them & reopen again.

Improvements & Fixes

  • Syntax now uses inheritance to provide HTML highlighting. As an end user, there should be no difference at all, but using inheritance should significantly reduce syntax & regex cache size on disk, offering improved performance.
  • Better test coverage for indentation using indentation tests.
  • All of the completion files are now updated to use kind, annotation & details.
  • Added support for highlighting cache tags.
  • Added command palette entries for opening documentation and keybindings.
  • Added CI for running syntax tests via GitHub Actions.

Version 1.0.8 (December 8, 2021)

08 Dec 11:06
Compare
Choose a tag to compare

This release addresses the following :-

  • This will be the final release for ST3 with no new changes. There were only minor README updates.