summaryrefslogtreecommitdiff
path: root/runtime/queries/rust
diff options
context:
space:
mode:
authorGokul Soumya2022-01-09 05:08:58 +0000
committerGokul Soumya2022-01-09 05:08:58 +0000
commitb3b4e78585d6a458954b8cb5b2c2a271a78b730b (patch)
tree4253fadc0dd035ac82c139adfc07927925f622fe /runtime/queries/rust
parent449624965b05fd2abc9e3ba2f791f8de8b1eeb3e (diff)
parent97e12f5c5a26cbbc2eddffd91a2e506403d4d453 (diff)
Merge branch 'master' into cursor-shape-new
Diffstat (limited to 'runtime/queries/rust')
-rw-r--r--runtime/queries/rust/injections.scm14
1 files changed, 14 insertions, 0 deletions
diff --git a/runtime/queries/rust/injections.scm b/runtime/queries/rust/injections.scm
index d8382e49..77c70805 100644
--- a/runtime/queries/rust/injections.scm
+++ b/runtime/queries/rust/injections.scm
@@ -10,3 +10,17 @@
(token_tree) @injection.content)
(#set! injection.language "rust")
(#set! injection.include-children))
+
+(call_expression
+ function: (scoped_identifier
+ path: (identifier) @_regex (#eq? @_regex "Regex")
+ name: (identifier) @_new (#eq? @_new "new"))
+ arguments: (arguments (raw_string_literal) @injection.content)
+ (#set! injection.language "regex"))
+
+(call_expression
+ function: (scoped_identifier
+ path: (scoped_identifier (identifier) @_regex (#eq? @_regex "Regex") .)
+ name: (identifier) @_new (#eq? @_new "new"))
+ arguments: (arguments (raw_string_literal) @injection.content)
+ (#set! injection.language "regex"))