summaryrefslogtreecommitdiff
path: root/runtime
diff options
context:
space:
mode:
Diffstat (limited to 'runtime')
-rw-r--r--runtime/queries/nix/injections.scm10
1 files changed, 10 insertions, 0 deletions
diff --git a/runtime/queries/nix/injections.scm b/runtime/queries/nix/injections.scm
index 1da63ce0..03a6dc36 100644
--- a/runtime/queries/nix/injections.scm
+++ b/runtime/queries/nix/injections.scm
@@ -6,6 +6,16 @@
(indented_string_expression (string_fragment) @injection.content))
(#set! injection.combined))
+; Common attribute keys corresponding to Python scripts,
+; such as those for NixOS VM tests in nixpkgs/nixos/tests.
+((binding
+ attrpath: (attrpath (identifier) @_path)
+ expression: (indented_string_expression
+ (string_fragment) @injection.content))
+ (#match? @_path "(^|\\.)testScript$")
+ (#set! injection.language "python")
+ (#set! injection.combined))
+
; Common attribute keys corresponding to scripts,
; such as those of stdenv.mkDerivation.
((binding