aboutsummaryrefslogtreecommitdiffstats
path: root/queries/go
diff options
context:
space:
mode:
Diffstat (limited to 'queries/go')
-rw-r--r--queries/go/injections.scm11
1 files changed, 9 insertions, 2 deletions
diff --git a/queries/go/injections.scm b/queries/go/injections.scm
index e0bdc99b9..68aa552cd 100644
--- a/queries/go/injections.scm
+++ b/queries/go/injections.scm
@@ -1,4 +1,5 @@
-(comment) @comment
+((comment) @injection.content
+ (#set! injection.language "comment"))
(call_expression
(selector_expression) @_function (#any-of? @_function
@@ -10,4 +11,10 @@
"regexp.MustCompile"
"regexp.MustCompilePOSIX")
(argument_list
- . [(raw_string_literal) (interpreted_string_literal)] @regex (#offset! @regex 0 1 0 -1)))
+ .
+ [
+ (raw_string_literal)
+ (interpreted_string_literal)
+ ] @injection.content
+ (#offset! @injection.content 0 1 0 -1)
+ (#set! injection.language "regex")))