Files
tree-sitter-nix-shell/tree-sitter-nix-shell/queries/injections.scm

9 lines
443 B
Scheme

; if we find an interpreter, mark the *entire file* as injected content.
; nix-shell doesn't process the source file before sending it to the interpreter,
; so nix-shell directives like `#!nix-shell -i bash` are both a directive to nix-shell
; and actual language content handled by the specified interpreter.
((source_file
(nix_shell_directive
(interpreter) @injection.language)) @injection.content
(#set! injection.include-children))