tokyonight theme, highlights/injections

This commit is contained in:
2022-12-19 20:27:52 -06:00
parent 4b30748f16
commit 2ac774d166
7 changed files with 152 additions and 59 deletions
+77 -39
View File
@@ -1,13 +1,12 @@
; inherits: html
(attribute_name) @keyword
[
"<"
">"
"</"
"/>"
] @punctuation.bracket
;[
; "<"
; ">"
; "</"
; "/>"
;] @punctuation.bracket
(doctype) @comment
@@ -15,41 +14,80 @@
((tag_name) @comment (#eq? @comment "html"))
(element
(start_tag
((tag_name) @function)
(attribute (attribute_name) @_alpine))
(#lua-match? @_alpine "^[@:]%l+.-$"))
;(element (start_tag ((tag_name) @function) (#eq? @function "template")))
;(element (end_tag ((tag_name) @function) (#eq? @function "template")))
(element
(start_tag
(attribute (attribute_name) @_alpine))
(end_tag ((tag_name) @function))
(#lua-match? @_alpine "^[@:]%l+.-$"))
;(attribute_name) @constant
(element
(start_tag
((tag_name) @function)
(attribute (attribute_name) @_alpine))
(#lua-match? @_alpine "^x[-]%l+$"))
;(element
; (start_tag
; ((tag_name) @function)
; (attribute (attribute_name) @_alpine))
; (#lua-match? @_alpine "^[@:]%l+.-$"))
;
;(element
; (start_tag
; (attribute (attribute_name) @_alpine))
; (end_tag ((tag_name) @function))
; (#lua-match? @_alpine "^[@:]%l+.-$"))
;
;(element
; (start_tag
; ((tag_name) @function)
; (attribute (attribute_name) @_alpine))
; (#lua-match? @_alpine "^x[-]%l+$"))
;
;(element
; (start_tag
; (attribute (attribute_name) @_alpine))
; (end_tag ((tag_name) @function))
; (#lua-match? @_alpine "^x[-]%l+$"))
;
;(element
; (self_closing_tag
; ((tag_name) @function)
; (attribute (attribute_name) @_alpine))
; (#lua-match? @_alpine "^[@:]%l+.-$"))
;
;(element
; (self_closing_tag
; ((tag_name) @function)
; (attribute (attribute_name) @_alpine))
; (#lua-match? @_alpine "^x[-]%l+$"))
;
;(element
; (start_tag
; (attribute (attribute_name) @parameter))
; (#lua-match? @parameter "^[@:]%l+.-$"))
;
;(element
; (start_tag
; (attribute (attribute_name) @parameter))
; (#lua-match? @parameter "^x[-]%l+$"))
;
;(element
; (self_closing_tag
; (attribute (attribute_name) @parameter))
; (#lua-match? @parameter "^[@:]%l+.-$"))
;
;(element
; (self_closing_tag
; (attribute (attribute_name) @parameter))
; (#lua-match? @parameter "^x[-]%l+$"))
(element
(start_tag
(attribute (attribute_name) @_alpine))
(end_tag ((tag_name) @function))
(#lua-match? @_alpine "^x[-]%l+$"))
((attribute_name) @parameter
(#lua-match? @parameter "^x[-]%l+$"))
(element
(self_closing_tag
((tag_name) @function)
(attribute (attribute_name) @_alpine))
(#lua-match? @_alpine "^[@:]%l+.-$"))
((attribute_name) @parameter
(#lua-match? @parameter "^[@:]%l+.-$"))
(element
(self_closing_tag
((tag_name) @function)
(attribute (attribute_name) @_alpine))
(#lua-match? @_alpine "^x[-]%l+$"))
((attribute
(attribute_name) @_alpine
(quoted_attribute_value (attribute_value) @operator))
(#lua-match? @_alpine "^[@:]%l+.-$"))
((attribute
(attribute_name) @_alpine
(quoted_attribute_value (attribute_value) @operator))
(#lua-match? @_alpine "^x[-]%l+$"))
(element (start_tag ((tag_name) @function) (#eq? @function "template")))
(element (end_tag ((tag_name) @function) (#eq? @function "template")))
+5 -5
View File
@@ -11,11 +11,11 @@
(script_element
(raw_text) @javascript)
((text) @python (#lua-match? @python "^{%p%s+%l+%s+.-%s+%p}$"))
((text) @htmldjango (#lua-match? @htmldjango "^{%p%s+%l+.-%s+%p}$"))
((text) @python (#lua-match? @python "^{{%s+.-%s+}}$"))
((text) @htmldjango (#lua-match? @htmldjango "^{{%s+.-%s+}}$"))
((attribute
(attribute_name) @_hyperscript
(quoted_attribute_value (attribute_value) @python))
(#eq? @_hyperscript "_"))
(quoted_attribute_value (attribute_value) @htmldjango))
(#lua-match? @htmldjango "^{{%s+.-%s+}}$"))