Add support for Vue files

I haven't included parsing the `style` tag, since the only applicable
queries we have are CSS (which actually works fine for SCSS too).
This commit is contained in:
Hugo Osvaldo Barrera 2021-02-08 18:48:14 +01:00 committed by Stephan Seitz
parent 6f25f2d8af
commit ff7ec08a1e
2 changed files with 57 additions and 0 deletions

View file

@ -0,0 +1,38 @@
[
(component)
(template_element)
(start_tag)
(tag_name)
(directive_attribute)
(directive_dynamic_argument)
(directive_dynamic_argument_value)
(component)
(end_tag)
] @tag
(erroneous_end_tag_name) @error
(attribute_name) @property
(attribute_value) @string
(quoted_attribute_value) @string
(comment) @comment
(text) @none
(element) @string
(interpolation) @punctuation.special
(interpolation
(raw_text) @none)
[
(directive_modifier)
(directive_name)
(directive_argument)
] @method
"=" @operator
[
"<"
">"
"</"
"/>"
] @tag.delimiter

View file

@ -0,0 +1,19 @@
((style_element
(raw_text) @css))
; There's no queries for less, sass nor postcss.
((script_element
(raw_text) @javascript))
(
(script_element
(start_tag
(attribute
(quoted_attribute_value (attribute_value) @_lang)))
(raw_text) @typescript)
(#match? @_lang "(ts|typescript)")
)
((interpolation
(raw_text) @javascript))