Skip to content

Commit

Permalink
feat(queries): regex injection for golang (helix-editor#9510)
Browse files Browse the repository at this point in the history
  • Loading branch information
matoous authored and Vulpesx committed Jun 7, 2024
1 parent c882c91 commit b3f60c6
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions runtime/queries/go/injections.scm
Original file line number Diff line number Diff line change
@@ -1,2 +1,14 @@
((comment) @injection.content
(#set! injection.language "comment"))


(call_expression
(selector_expression) @_function
(#any-of? @_function "regexp.Match" "regexp.MatchReader" "regexp.MatchString" "regexp.Compile" "regexp.CompilePOSIX" "regexp.MustCompile" "regexp.MustCompilePOSIX")
(argument_list
.
[
(raw_string_literal)
(interpreted_string_literal)
] @injection.content
(#set! injection.language "regex")))

0 comments on commit b3f60c6

Please sign in to comment.