Unnamed repository; edit this file 'description' to name the repository.
| -rw-r--r-- | runtime/queries/bash/injections.scm | 8 | ||||
| -rw-r--r-- | runtime/queries/fish/injections.scm | 5 | ||||
| -rw-r--r-- | runtime/queries/nu/injections.scm | 7 |
3 files changed, 19 insertions, 1 deletions
diff --git a/runtime/queries/bash/injections.scm b/runtime/queries/bash/injections.scm index d6771e44..ce25a6c0 100644 --- a/runtime/queries/bash/injections.scm +++ b/runtime/queries/bash/injections.scm @@ -9,3 +9,11 @@ ((regex) @injection.content (#set! injection.language "regex")) + +(command + name: (command_name (word) @_command (#any-of? @_command "jq" "jaq")) + argument: [ + (raw_string) @injection.content + (string (string_content) @injection.content) + ] + (#set! injection.language "jq")) diff --git a/runtime/queries/fish/injections.scm b/runtime/queries/fish/injections.scm index 321c90ad..3378c14a 100644 --- a/runtime/queries/fish/injections.scm +++ b/runtime/queries/fish/injections.scm @@ -1,2 +1,7 @@ ((comment) @injection.content (#set! injection.language "comment")) + +(command + name: (word) @_command (#any-of? @_command "jq" "jaq") + argument: [(double_quote_string) (single_quote_string)] @injection.content + (#set! injection.language "jq")) diff --git a/runtime/queries/nu/injections.scm b/runtime/queries/nu/injections.scm index 30804d65..690ff9a8 100644 --- a/runtime/queries/nu/injections.scm +++ b/runtime/queries/nu/injections.scm @@ -1,2 +1,7 @@ ((comment) @injection.content - (#set! injection.language "comment"))
\ No newline at end of file + (#set! injection.language "comment")) + +(command + head: (cmd_identifier) @_command (#any-of? @_command "jq" "jaq") + arg: (val_string) @injection.content + (#set! injection.language "jq")) |