fix(htmldjango): improve highlights

This commit is contained in:
ObserverOfTime 2023-11-10 14:20:30 +02:00
parent 208504c707
commit 04a9a90c2a
2 changed files with 19 additions and 5 deletions

View file

@ -2,8 +2,9 @@
(erroneous_end_tag_name) @error (erroneous_end_tag_name) @error
(comment) @comment @spell (comment) @comment @spell
(attribute_name) @tag.attribute (attribute_name) @tag.attribute
(attribute ((attribute
(quoted_attribute_value) @string) (quoted_attribute_value) @string)
(#set! "priority" 99))
(text) @text @spell (text) @text @spell
((element (start_tag (tag_name) @_tag) (text) @text.title) ((element (start_tag (tag_name) @_tag) (text) @text.title)

View file

@ -23,13 +23,26 @@
(keyword) @keyword (keyword) @keyword
(operator) @operator [
(variable "|" @operator) "|"
(paired_statement "=" @operator) "="
(operator)
] @operator
(keyword_operator) @keyword.operator (keyword_operator) @keyword.operator
(string) @string
(filter [ "'" "\"" ] . (filter_argument) @string)
(number) @number (number) @number
((filter (filter_argument) @number)
(#lua-match? @number "^%d+$"))
(boolean) @boolean (boolean) @boolean
((filter (filter_argument) @boolean)
(#any-of? @boolean "True" "False"))
(string) @string [
":"
"'"
"\""
] @punctuation.delimiter