Function: just-ts-indent-in-recipe-body
just-ts-indent-in-recipe-body is a natively compiled function defined
in just-ts-mode.el.
Signature
(just-ts-indent-in-recipe-body NODE PARENT BOL)
Documentation
Identify if the cursor is in a recipe body.
Identify if BOL is at a recipe body start, where PARENT is the file and NODE is nil for some reason.
Source Code
;; Defined in /nix/store/1vmf8s52d6vniw28ckf3szxslimhfphb-emacs-packages-deps/share/emacs/site-lisp/elpa/just-ts-mode-20260319.1513/just-ts-mode.el
(defun just-ts-indent-in-recipe-body (_node _parent _bol)
"Identify if the cursor is in a recipe body.
Identify if BOL is at a recipe body start, where PARENT is the file and NODE is
nil for some reason."
(save-excursion
(forward-line -1)
(let* ((prev-line-node (treesit-node-at (pos-bol)))
(prev-line-parent (treesit-node-parent prev-line-node))
(prev-line-gp-type (treesit-node-type (treesit-node-parent prev-line-parent)))
(prev-line-type (treesit-node-type prev-line-parent)))
(or
;; The next line after the header
(equal prev-line-type "recipe_header")
;; The next line after a recipe line
(equal prev-line-type "recipe_line")
;; The next line after a prefixed line e.g. starting with "@"
(equal prev-line-gp-type "recipe_line")))))