diff options
| -rw-r--r-- | queries/css/highlights.scm | 48 | ||||
| -rw-r--r-- | queries/pug/highlights.scm | 4 | ||||
| -rw-r--r-- | queries/templ/highlights.scm | 4 |
3 files changed, 31 insertions, 25 deletions
diff --git a/queries/css/highlights.scm b/queries/css/highlights.scm index 506f78251..a07fcb7be 100644 --- a/queries/css/highlights.scm +++ b/queries/css/highlights.scm @@ -5,19 +5,32 @@ "@supports" "@keyframes" (at_keyword) +] @keyword.directive + +"@import" @keyword.import + +[ (to) (from) ] @keyword -"@import" @keyword.import - (comment) @comment @spell +(tag_name) @tag + +(class_name) @type + +(id_name) @constant + +[ + (property_name) + (feature_name) +] @property + [ - (tag_name) (nesting_selector) (universal_selector) -] @type +] @character.special (function_name) @function @@ -50,26 +63,20 @@ (pseudo_element_selector "::" - (tag_name) @property) + (tag_name) @attribute) (pseudo_class_selector - (class_name) @property) + (class_name) @attribute) -[ - (class_name) - (id_name) - (property_name) - (feature_name) - (attribute_name) -] @property +(attribute_name) @tag.attribute (namespace_name) @module -((property_name) @type.definition - (#lua-match? @type.definition "^[-][-]")) +((property_name) @variable + (#lua-match? @variable "^[-][-]")) -((plain_value) @type - (#lua-match? @type "^[-][-]")) +((plain_value) @variable + (#lua-match? @variable "^[-][-]")) [ (string_value) @@ -77,10 +84,9 @@ (unit) ] @string -[ - (integer_value) - (float_value) -] @number +(integer_value) @number + +(float_value) @number.float [ "#" diff --git a/queries/pug/highlights.scm b/queries/pug/highlights.scm index 3645a7e3e..8441b737e 100644 --- a/queries/pug/highlights.scm +++ b/queries/pug/highlights.scm @@ -19,7 +19,7 @@ (id) @constant -(class) @property +(class) @type (doctype) @keyword.directive @@ -56,7 +56,7 @@ (block_prepend (keyword)+ @keyword) -(block_name) @type +(block_name) @module (conditional (keyword) @keyword.conditional) diff --git a/queries/templ/highlights.scm b/queries/templ/highlights.scm index f8e9d2359..628b5bf15 100644 --- a/queries/templ/highlights.scm +++ b/queries/templ/highlights.scm @@ -23,10 +23,10 @@ (css_identifier) @function (css_property - name: (css_property_name) @attribute) + name: (css_property_name) @property) (css_property - value: (css_property_value) @attribute) + value: (css_property_value) @string) [ (expression) |
