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 mtoohey31 committed Jun 2, 2024
1 parent 5ba28b4 commit ad9f395
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 ad9f395

Please sign in to comment.