forked from IndianBoy42/tree-sitter-just
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for injections in recipes and commands
Use bash as a defaul
- Loading branch information
Showing
10 changed files
with
557 additions
and
336 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,23 @@ | ||
(comment) @comment | ||
; This query specifies how nested languages are handled | ||
|
||
; FIXME: shebang | ||
; (shebang_recipe | ||
; (shebang | ||
; interpreter:(TEXT) @language) | ||
; (shebang_body) @content | ||
; ) | ||
((comment) @injection.content | ||
(#set! injection.language "comment")) | ||
|
||
(source_file | ||
; (item (setting lang:(identifier) @language)) | ||
(item (recipe (recipe_body) @content)) | ||
) | ||
|
||
; (interpolation (expression) @just) | ||
(recipe_line | ||
(text) @injection.content | ||
(#set! injection.language "bash")) | ||
|
||
(external_command | ||
(command_body) @injection.content | ||
(#set! injection.language "bash")) | ||
|
||
; ; FIXME: read default from shebang | ||
; ([ | ||
; (recipe_body | ||
; (recipe_line (text))) | ||
; (external_command | ||
; body: (_)*) | ||
; ] @injection.content | ||
; (#set! injection.language "bash") | ||
; ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,25 @@ | ||
; File autogenerated by build-queries-nvim.py; do not edit | ||
|
||
(comment) @comment | ||
; This query specifies how nested languages are handled | ||
|
||
; FIXME: shebang | ||
; (shebang_recipe | ||
; (shebang | ||
; interpreter:(TEXT) @language) | ||
; (shebang_body) @content | ||
; ) | ||
((comment) @injection.content | ||
(#set! injection.language "comment")) | ||
|
||
(source_file | ||
; (item (setting lang:(identifier) @language)) | ||
(item (recipe (recipe_body) @content)) | ||
) | ||
|
||
; (interpolation (expression) @just) | ||
(recipe_line | ||
(text) @injection.content | ||
(#set! injection.language "bash")) | ||
|
||
(external_command | ||
(command_body) @injection.content | ||
(#set! injection.language "bash")) | ||
|
||
; ; FIXME: read default from shebang | ||
; ([ | ||
; (recipe_body | ||
; (recipe_line (text))) | ||
; (external_command | ||
; body: (_)*) | ||
; ] @injection.content | ||
; (#set! injection.language "bash") | ||
; ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.