aboutsummaryrefslogtreecommitdiff
path: root/runtime/queries/vue
diff options
context:
space:
mode:
authorBlaž Hrastnik2021-10-17 04:51:56 +0000
committerBlaž Hrastnik2021-10-17 04:51:56 +0000
commit0a6b60085a56876068bf652c9491c435e9cca229 (patch)
tree8681db55d1a7707421f98d81a108d6438459536a /runtime/queries/vue
parentbc0084d071ac53fa460370667cdd8740e7499c76 (diff)
parente216e9621e73cda1968632cd20595231af5e07be (diff)
Merge branch 'master' into debug
Diffstat (limited to 'runtime/queries/vue')
-rw-r--r--runtime/queries/vue/highlights.scm21
-rw-r--r--runtime/queries/vue/injections.scm17
2 files changed, 38 insertions, 0 deletions
diff --git a/runtime/queries/vue/highlights.scm b/runtime/queries/vue/highlights.scm
new file mode 100644
index 00000000..f90ae429
--- /dev/null
+++ b/runtime/queries/vue/highlights.scm
@@ -0,0 +1,21 @@
+(tag_name) @tag
+(end_tag) @tag
+
+(directive_name) @keyword
+(directive_argument) @constant
+
+(attribute
+ (attribute_name) @attribute
+ (quoted_attribute_value
+ (attribute_value) @string)
+)
+
+(comment) @comment
+
+[
+ "<"
+ ">"
+ "</"
+ "{{"
+ "}}"
+] @punctuation.bracket \ No newline at end of file
diff --git a/runtime/queries/vue/injections.scm b/runtime/queries/vue/injections.scm
new file mode 100644
index 00000000..8ee34ffb
--- /dev/null
+++ b/runtime/queries/vue/injections.scm
@@ -0,0 +1,17 @@
+(directive_attribute
+ (directive_name) @keyword
+ (quoted_attribute_value
+ (attribute_value) @injection.content)
+ (#set! injection.language "javascript"))
+
+((interpolation
+ (raw_text) @injection.content)
+ (#set! injection.language "javascript"))
+
+((script_element
+ (raw_text) @injection.content)
+ (#set! injection.language "javascript"))
+
+((style_element
+ (raw_text) @injection.content)
+ (#set! injection.language "css"))