Unnamed repository; edit this file 'description' to name the repository.
| -rw-r--r-- | runtime/queries/nix/injections.scm | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/runtime/queries/nix/injections.scm b/runtime/queries/nix/injections.scm index 6b4ddc1f..2b87ff5d 100644 --- a/runtime/queries/nix/injections.scm +++ b/runtime/queries/nix/injections.scm @@ -50,6 +50,15 @@ (#set! injection.language "json") (#set! injection.combined)) +; builtins.fromTOML toml +; Example: https://github.com/NixOS/nix/blob/3e8cd2ffe6c2c6ed8aae7853ddcfcc6d2a49b0ce/tests/functional/lang/eval-okay-fromTOML.nix +((apply_expression + function: (_) @_func + argument: (indented_string_expression (string_fragment) @injection.content)) + (#match? @_func "(^|\\.)fromTOML$") + (#set! injection.language "toml") + (#set! injection.combined)) + ; trivial-builders.nix pkgs.writeShellScript[Bin] name content ((apply_expression function: (apply_expression function: (_) @_func) |