From 04a9a90c2a60c86aa9451c539586326b337b03e5 Mon Sep 17 00:00:00 2001 From: ObserverOfTime Date: Fri, 10 Nov 2023 14:20:30 +0200 Subject: [PATCH] fix(htmldjango): improve highlights --- queries/html_tags/highlights.scm | 3 ++- queries/htmldjango/highlights.scm | 21 +++++++++++++++++---- 2 files changed, 19 insertions(+), 5 deletions(-) diff --git a/queries/html_tags/highlights.scm b/queries/html_tags/highlights.scm index d51f9b27e..8d39afd49 100644 --- a/queries/html_tags/highlights.scm +++ b/queries/html_tags/highlights.scm @@ -2,8 +2,9 @@ (erroneous_end_tag_name) @error (comment) @comment @spell (attribute_name) @tag.attribute -(attribute +((attribute (quoted_attribute_value) @string) + (#set! "priority" 99)) (text) @text @spell ((element (start_tag (tag_name) @_tag) (text) @text.title) diff --git a/queries/htmldjango/highlights.scm b/queries/htmldjango/highlights.scm index 848b455dd..814c7c420 100644 --- a/queries/htmldjango/highlights.scm +++ b/queries/htmldjango/highlights.scm @@ -23,13 +23,26 @@ (keyword) @keyword -(operator) @operator -(variable "|" @operator) -(paired_statement "=" @operator) +[ + "|" + "=" + (operator) +] @operator (keyword_operator) @keyword.operator +(string) @string +(filter [ "'" "\"" ] . (filter_argument) @string) + (number) @number +((filter (filter_argument) @number) + (#lua-match? @number "^%d+$")) (boolean) @boolean +((filter (filter_argument) @boolean) + (#any-of? @boolean "True" "False")) -(string) @string +[ + ":" + "'" + "\"" +] @punctuation.delimiter