Skip to content

Commit

Permalink
Merge pull request #7 from piechologist/main
Browse files Browse the repository at this point in the history
Add highlighting for regex patterns
  • Loading branch information
hasit authored May 1, 2024
2 parents 895dd97 + 0d528d7 commit 06766f5
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
2 changes: 1 addition & 1 deletion extension.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "Fish",
"version": "0.0.7",
"version": "0.0.8",
"authors": [
"Hasit Mistry <[email protected]>"
],
Expand Down
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 06766f5

Please sign in to comment.