From 8189d91cf82b78fd765b28c674537688bce70c10 Mon Sep 17 00:00:00 2001 From: virchau13 Date: Mon, 27 Nov 2023 21:11:28 +0800 Subject: [PATCH] astro: add custom component highlighting (#5728) --- queries/astro/highlights.scm | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/queries/astro/highlights.scm b/queries/astro/highlights.scm index 62e8ed247..91ccbffb3 100644 --- a/queries/astro/highlights.scm +++ b/queries/astro/highlights.scm @@ -3,3 +3,11 @@ [ "---" ] @punctuation.delimiter [ "{" "}" ] @punctuation.special + +; custom components get `@type` highlighting +((start_tag (tag_name) @type) + (#lua-match? @type "^[A-Z]")) +((end_tag (tag_name) @type) + (#lua-match? @type "^[A-Z]")) +((erroneous_end_tag (erroneous_end_tag_name) @type) + (#lua-match? @type "^[A-Z]"))