diff --git a/NgxHTML.sublime-syntax b/NgxHTML.sublime-syntax index 49a9ca8..bcb04a3 100644 --- a/NgxHTML.sublime-syntax +++ b/NgxHTML.sublime-syntax @@ -9,13 +9,13 @@ version: 2 extends: Packages/HTML/HTML.sublime-syntax variables: - angular_blocks: (?<=\@)\b(?xi:for | if | else | else if | switch | case | empty | placeholder | defer | default | error | loading)\b + angular_blocks: (?<=\@)\b(?xi:for | if | else | else if | switch | case | empty | placeholder | defer | default | error | loading | let)\b contexts: main: - meta_prepend: true - include: interpolation - - include: angular-blocks + - include: ng-control-flow interpolation: - match: '{{' @@ -88,12 +88,19 @@ contexts: - tag-event-attribute-assignment - angular-blocks: + ng-control-flow: - match: '(@){{angular_blocks}}' scope: keyword.control.control-flow.html captures: 1: punctuation.definition.keyword.html push: + - match: '=' + scope: punctuation.section.let.begin.ngx.html + push: + - meta_scope: meta.let.ngx.html + - match: ';' + scope: punctuation.section.let.end.ngx.html + pop: 2 - match: \{ scope: punctuation.section.block.begin.html push: diff --git a/README.md b/README.md index 54ab69c..064c8e5 100644 --- a/README.md +++ b/README.md @@ -31,6 +31,10 @@ Highlighting the JS part as JS. So, Now it supports Angular control flow. +``` +@let myVar = myObservable | async; +``` + ``` @for (item of items) { {{item.title}}