diff options
| author | Hugo Osvaldo Barrera <hugo@barrera.io> | 2021-02-08 18:48:14 +0100 |
|---|---|---|
| committer | Stephan Seitz <stephan.lauf@yahoo.de> | 2021-02-17 14:43:32 +0100 |
| commit | ff7ec08a1e90a38c955a17c51afb3046ee98e608 (patch) | |
| tree | d59d0328c6d2b99646fa3771c44891f642d67e42 | |
| parent | 6f25f2d8af878dbd1a09f24aacffc36357d5ee73 (diff) | |
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).
| -rw-r--r-- | queries/vue/highlights.scm | 38 | ||||
| -rw-r--r-- | queries/vue/injections.scm | 19 |
2 files changed, 57 insertions, 0 deletions
diff --git a/queries/vue/highlights.scm b/queries/vue/highlights.scm new file mode 100644 index 00000000..f16c189a --- /dev/null +++ b/queries/vue/highlights.scm @@ -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 diff --git a/queries/vue/injections.scm b/queries/vue/injections.scm new file mode 100644 index 00000000..602f4f4f --- /dev/null +++ b/queries/vue/injections.scm @@ -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)) |
