astro: add custom component highlighting (#5728)

This commit is contained in:
virchau13 2023-11-27 21:11:28 +08:00 committed by GitHub
parent 482a2f15d3
commit 8189d91cf8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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]"))