Function: treesit--indent-prev-line-node

treesit--indent-prev-line-node is a byte-compiled function defined in treesit.el.gz.

Signature

(treesit--indent-prev-line-node POS)

Documentation

Return the largest node on the previous (non-empty) line of POS.

Source Code

;; Defined in /usr/src/emacs/lisp/treesit.el.gz
(defun treesit--indent-prev-line-node (pos)
  "Return the largest node on the previous (non-empty) line of POS."
  (save-excursion
    (goto-char pos)
    (when (eq (forward-line -1) 0)
      ;; Skip blank lines.
      (while (and (looking-at-p (rx (* (syntax whitespace)) eol))
                  (eq (forward-line -1) 0)))
      (back-to-indentation)
      (treesit--indent-largest-node-at (point)))))