From ce54e40d3a5cc15887c307299ae314c048766bc8 Mon Sep 17 00:00:00 2001 From: vrugtehagel Date: Mon, 1 Sep 2025 14:17:43 +0200 Subject: [PATCH] Add support for slot tag --- Syntaxes/Vento.sublime-syntax | 8 ++++++++ tests/syntax_test_Vento.txt.vto | 11 +++++++++++ 2 files changed, 19 insertions(+) diff --git a/Syntaxes/Vento.sublime-syntax b/Syntaxes/Vento.sublime-syntax index f88aeb1..3d59c0b 100644 --- a/Syntaxes/Vento.sublime-syntax +++ b/Syntaxes/Vento.sublime-syntax @@ -158,6 +158,14 @@ contexts: - match: '\blayout\b' scope: keyword.control.layout.begin.vento push: tag_opening_end_pipeable + - match: '\bslot\b' + scope: keyword.declaration.slot.begin.vento + push: tag_opening_end_pipeable + - match: '(/)slot\b' + captures: + 0: keyword.declaration.slot.end.vento + 1: punctuation.section.tag.end.vento + push: tag_closing_end - match: '(/)layout\b' captures: 0: keyword.control.layout.end.vento diff --git a/tests/syntax_test_Vento.txt.vto b/tests/syntax_test_Vento.txt.vto index f5e546b..83513ec 100644 --- a/tests/syntax_test_Vento.txt.vto +++ b/tests/syntax_test_Vento.txt.vto @@ -194,6 +194,17 @@ {{# ^^^^^^^^^^^^^^^^^^^^^^^ source.js.embedded.vento #}} {{# ^^ punctuation.definition.embedded.end.vento #}} + {{ slot foo }}bar{{ /slot }} +{{# ^^ punctuation.definition.embedded.begin.vento #}} +{{# ^^^^ keyword.declaration.slot.begin.vento #}} +{{# ^^^ source.js.embedded.vento #}} +{{# ^^ punctuation.definition.embedded.end.vento #}} +{{# ^^^ text.plain.vento #}} +{{# ^^ punctuation.definition.embedded.begin.vento #}} +{{# ^ punctuation.section.tag.end.vento #}} +{{# ^^^^ keyword.declaration.slot.end.vento #}} +{{# ^^ punctuation.definition.embedded.end.vento #}} + {{ /layout }} {{# ^^ punctuation.definition.embedded.begin.vento #}} {{# ^ punctuation.section.tag.end.vento #}}