From 0befd33b4bf7c3ff633fcab425d252797072535e Mon Sep 17 00:00:00 2001 From: Donnie Adams Date: Fri, 10 Apr 2026 07:41:15 -0400 Subject: [PATCH 1/2] enhance: add support for comment extension Signed-off-by: Donnie Adams --- languages/astro/injections.scm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/languages/astro/injections.scm b/languages/astro/injections.scm index 858bd32..300ba98 100644 --- a/languages/astro/injections.scm +++ b/languages/astro/injections.scm @@ -52,3 +52,6 @@ (raw_text) @injection.content (#not-match? @_start_tag "lang=") (#set! injection.language "css")) + +((comment) @injection.content + (#set! injection.language "comment")) From eabde4141074f33922dbe2f8ab40eb9401bdbd20 Mon Sep 17 00:00:00 2001 From: Donnie Adams Date: Fri, 10 Apr 2026 07:41:15 -0400 Subject: [PATCH 2/2] chore: format queries Signed-off-by: Donnie Adams --- languages/astro/brackets.scm | 19 +++++++++++++++---- languages/astro/highlights.scm | 5 +++++ languages/astro/indents.scm | 5 ++++- 3 files changed, 24 insertions(+), 5 deletions(-) diff --git a/languages/astro/brackets.scm b/languages/astro/brackets.scm index f5990c1..0267f50 100644 --- a/languages/astro/brackets.scm +++ b/languages/astro/brackets.scm @@ -1,5 +1,16 @@ -("{" @open "}" @close) -("<" @open ">" @close) -("\"" @open "\"" @close) +("{" @open + "}" @close) -((element (start_tag) @open [(end_tag) (erroneous_end_tag)] @close) (#set! newline.only)) +("<" @open + ">" @close) + +("\"" @open + "\"" @close) + +((element + (start_tag) @open + [ + (end_tag) + (erroneous_end_tag) + ] @close) + (#set! newline.only)) diff --git a/languages/astro/highlights.scm b/languages/astro/highlights.scm index a565e22..20825e2 100644 --- a/languages/astro/highlights.scm +++ b/languages/astro/highlights.scm @@ -1,8 +1,13 @@ (tag_name) @tag + (erroneous_end_tag_name) @keyword + (doctype) @tag.doctype + (attribute_name) @property + (attribute_value) @string + (comment) @comment [ diff --git a/languages/astro/indents.scm b/languages/astro/indents.scm index 9c14a34..1079492 100644 --- a/languages/astro/indents.scm +++ b/languages/astro/indents.scm @@ -1,3 +1,6 @@ (element (start_tag) @start - [(end_tag) (erroneous_end_tag)]? @end) @indent + [ + (end_tag) + (erroneous_end_tag) + ]? @end) @indent