Skip to content

Commit

Permalink
Create injections.scm to highlight regex patterns
Browse files Browse the repository at this point in the history
  • Loading branch information
piechologist authored Apr 25, 2024
1 parent 895dd97 commit ca62955
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions languages/fish/injections.scm
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
((command
name: (word) @_command
.
argument: (word) @_verb
argument: (single_quote_string) @content)
(#eq? @_command "string")
(#any-of? @_verb "match" "replace")
(#set! "language" "regex"))

((command
name: (word) @_command
argument: (single_quote_string) @content)
(#any-of? @_command "grep" "egrep" "rg" "sed")
(#set! "language" "regex"))

0 comments on commit ca62955

Please sign in to comment.