diff --git a/after/queries/css/highlights.scm b/after/queries/css/highlights.scm new file mode 100644 index 0000000..7fa2000 --- /dev/null +++ b/after/queries/css/highlights.scm @@ -0,0 +1,18 @@ +(id_selector (id_name) @CssIdentifier) +(id_selector (id_name)) @CssIdSelector +(tag_name) @HtmlTagName + +(class_selector (class_name) @CssClassName) +(selectors (pseudo_class_selector (class_name) @cssPseudoClass)) +(nesting_selector) @cssNestingSelector + +; need to find out how to make this more specific? +(universal_selector) @CssUniversalSelector + +((property_name) (_)) @CssProp + +(unit) @CssUnit + +(declaration (property_name) (_) @CssPropertyValue) + +(media_statement (feature_query (feature_name) @cssMediaFeatureName (_ (unit) @cssMediaQueryValueUnit) @cssMediaQueryValue) @cssMediaQuery) diff --git a/after/queries/ecma/highlights.scm b/after/queries/ecma/highlights.scm new file mode 100644 index 0000000..e69de29 diff --git a/after/queries/html/highlights.scm b/after/queries/html/highlights.scm new file mode 100644 index 0000000..2b752d4 --- /dev/null +++ b/after/queries/html/highlights.scm @@ -0,0 +1,17 @@ +(start_tag + (attribute + (attribute_name) @ClassNameAttribute (#eq? @ClassNameAttribute "class") + (quoted_attribute_value + (attribute_value) @CssClassName ))) + +(start_tag + (attribute + (attribute_name) @IdAttribute (#eq? @IdAttribute "id") + (quoted_attribute_value + (attribute_value) @CssIdentifier ))) + +(start_tag + (attribute + (attribute_name) @DataAttribute (#match? @DataAttribute "^data-") + (quoted_attribute_value + (attribute_value) @DataAttributeValue )))