All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- Indentation for Twig code blocks.
- Snippets for commonly used Twig blocks.
- The main syntax file along with syntax tests for the scopes.
- Auto completions for builtin tags, filters, tests and functions.
- Abiility to use ctrl + / for Twig line comments & ctrl + shift + / for block comments.
- Comments in Twig (
{# #}
) are now triggered by ctrl + / or ctrl + shift + /. Removed the erroneous behavior where ctrl + / would trigger adding##
at the beginning of a line (Mistaken for a line comment).
- ctrl + / no longer adds
##
to the beginning of a line.
- The base scope is now changed from
text.twig
totext.html.twig
. - Fixed regex modifiers breaking the syntax highlighting.
- Fixed operators & language constants not being scoped in data structures.
- Updated numeric literals to having the
meta.number
scopes. - Fixed scoping for the
endif
&endfor
tags - Removed the non needed settings file.
- Cleaned up the syntax definition a bit and added more tests.
- Ternary operators not highlighting.
- Import statements not getting highlighted.
- More specific language constant scopes.
- Quoted string escapes not highlighting.
- Better scoping of builtin tests.
- Additional keybindings for interpolation & to come out of empty statements/expression blocks.
- Keybindings to come out of empty statements/expression blocks.
- Regex highlighting in strings.
- 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, offerring 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.
- Twig comments not working.
- Key bindings file not opening from the menu & command palette.
- String scopes are now properly cleared when expressions and statements are present in strings.
- Fix a bug where ending
)
was scoped aspunctuation.section.group.begin.twig
. - Code within
verbatim
blocks are now, not syntax highlighted anymore (to represent raw plain text). - General syntax context name cleanups.
- 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)
- 4142 (Nov 10 2022) is the oldest supported build of Sublime Text.
- 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.
- {% %} is now scoped as meta.statement, {{ }} as meta.expression.
- The above mentioned scope clearing changes scopes in some cases.
- 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