aboutsummaryrefslogtreecommitdiffstats
path: root/queries/astro
diff options
context:
space:
mode:
authorvirchau13 <virchau13@hexular.net>2023-11-27 21:11:28 +0800
committerGitHub <noreply@github.com>2023-11-27 22:11:28 +0900
commit8189d91cf82b78fd765b28c674537688bce70c10 (patch)
tree490435c117c977eaf031e6b8fc820564c4f0d998 /queries/astro
parentFix robot parser metadata in parsers.lua (diff)
downloadnvim-treesitter-8189d91cf82b78fd765b28c674537688bce70c10.tar
nvim-treesitter-8189d91cf82b78fd765b28c674537688bce70c10.tar.gz
nvim-treesitter-8189d91cf82b78fd765b28c674537688bce70c10.tar.bz2
nvim-treesitter-8189d91cf82b78fd765b28c674537688bce70c10.tar.lz
nvim-treesitter-8189d91cf82b78fd765b28c674537688bce70c10.tar.xz
nvim-treesitter-8189d91cf82b78fd765b28c674537688bce70c10.tar.zst
nvim-treesitter-8189d91cf82b78fd765b28c674537688bce70c10.zip
astro: add custom component highlighting (#5728)
Diffstat (limited to 'queries/astro')
-rw-r--r--queries/astro/highlights.scm8
1 files changed, 8 insertions, 0 deletions
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]"))