@@ -0,0 +1,39 @@
1+; mark arbitary languages with a comment
2+((((comment) @injection.language) .
3+ (indented_string_expression (string_fragment) @injection.content))
4+ (#set! injection.combined))
5+
6+((binding
7+ attrpath: (attrpath (identifier) @_path)
8+ expression: (indented_string_expression
9+ (string_fragment) @injection.content))
10+ (#match? @_path "(^\\w*Phase|(pre|post)\\w*|(.*\\.)?\\w*([sS]cript|[hH]ook)|(.*\\.)?startup)$")
11+ (#set! injection.language "bash")
12+ (#set! injection.combined))
13+
14+((apply_expression
15+ function: (apply_expression function: (_) @_func)
16+ argument: (indented_string_expression (string_fragment) @injection.content))
17+ (#match? @_func "(^|\\.)writeShellScript(Bin)?$")
18+ (#set! injection.language "bash")
19+ (#set! injection.combined))
20+
21+(apply_expression
22+ (apply_expression
23+ function: (apply_expression
24+ function: ((_) @_func)))
25+ argument: (indented_string_expression (string_fragment) @injection.content)
26+ (#match? @_func "(^|\\.)runCommand(((No)?(CC))?(Local)?)?$")
27+ (#set! injection.language "bash")
28+ (#set! injection.combined))
29+
30+(apply_expression
31+ function: ((_) @_func)
32+ argument: (_ (_)* (_ (_)* (binding
33+ attrpath: (attrpath (identifier) @_path)
34+ expression: (indented_string_expression
35+ (string_fragment) @injection.content))))
36+ (#match? @_func "(^|\\.)writeShellApplication$")
37+ (#match? @_path "^text$")
38+ (#set! injection.language "bash")
39+ (#set! injection.combined))