diff --git a/queries-src/injections.scm b/queries-src/injections.scm index f42b565..fae1e47 100644 --- a/queries-src/injections.scm +++ b/queries-src/injections.scm @@ -3,6 +3,18 @@ (comment) @comment +; Default everything to be bash +; FIXME: uncomment this when we have a better idea of how precedence will work +; in all editors, since this is pretty turbulant in early 2024. +; (recipe_body +; (#set! injection.language "bash") +; (#set! injection.include-children)) @injection.content + +(external_command + (command_body) @injection.content + (#set! injection.language "bash")) + +; Set highlighting for recipes that set a language (recipe_body (shebang (language) @injection.language) (#set! injection.include-children)) @injection.content @@ -10,13 +22,3 @@ ; Highlight the RHS of `=~` as regex ((regex_literal (_) @injection.content) (#set! injection.language "regex")) - -; Defaults if language is not set elsewhere - -; (recipe_line -; (text) @injection.content -; (#set! injection.language "bash")) - -; (external_command -; (command_body) @injection.content -; (#set! injection.language "bash")) diff --git a/queries/just/injections.scm b/queries/just/injections.scm index d71ad8f..cb420f1 100644 --- a/queries/just/injections.scm +++ b/queries/just/injections.scm @@ -5,6 +5,18 @@ (comment) @comment +; Default everything to be bash +; FIXME: uncomment this when we have a better idea of how precedence will work +; in all editors, since this is pretty turbulant in early 2024. +; (recipe_body +; (#set! injection.language "bash") +; (#set! injection.include-children)) @injection.content + +(external_command + (command_body) @injection.content + (#set! injection.language "bash")) + +; Set highlighting for recipes that set a language (recipe_body (shebang (language) @injection.language) (#set! injection.include-children)) @injection.content @@ -12,13 +24,3 @@ ; Highlight the RHS of `=~` as regex ((regex_literal (_) @injection.content) (#set! injection.language "regex")) - -; Defaults if language is not set elsewhere - -; (recipe_line -; (text) @injection.content -; (#set! injection.language "bash")) - -; (external_command -; (command_body) @injection.content -; (#set! injection.language "bash"))