on master help sign in
queries/nix: add injection rule for python test scripts
b4494e1pacien
runtime/queries/nix/injections.scm+10
@@ -6,6 +6,16 @@
6 (indented_string_expression (string_fragment) @injection.content))
6 (indented_string_expression (string_fragment) @injection.content))
7 (#set! injection.combined))
7 (#set! injection.combined))
8
8
9+; Common attribute keys corresponding to Python scripts,
10+; such as those for NixOS VM tests in nixpkgs/nixos/tests.
11+((binding
12+ attrpath: (attrpath (identifier) @_path)
13+ expression: (indented_string_expression
14+ (string_fragment) @injection.content))
15+ (#match? @_path "(^|\\.)testScript$")
16+ (#set! injection.language "python")
17+ (#set! injection.combined))
18+
9; Common attribute keys corresponding to scripts,
19; Common attribute keys corresponding to scripts,
10; such as those of stdenv.mkDerivation.
20; such as those of stdenv.mkDerivation.
11((binding
21((binding