Function: treesit-fold-range-lisp-function
treesit-fold-range-lisp-function is a natively compiled function
defined in treesit-fold.el.
Signature
(treesit-fold-range-lisp-function NODE OFFSET)
Documentation
Define fold range for function in Lisp .
For arguments NODE and OFFSET, see function treesit-fold-range-seq for
more information.
Source Code
;; Defined in /nix/store/mpy1l6b4hlzpp59l4vbahq83hqa821ci-emacs-packages-deps/share/emacs/site-lisp/elpa/treesit-fold-0.2.1/treesit-fold.el
(defun treesit-fold-range-lisp-function (node offset)
"Define fold range for function in Lisp .
For arguments NODE and OFFSET, see function `treesit-fold-range-seq' for
more information."
(when-let* ((header (car (treesit-fold-find-children node "defun_header")))
(body (treesit-node-next-sibling header))
(beg (treesit-node-start body))
(end (1- (treesit-node-end node))))
(treesit-fold--cons-add (cons beg end) offset)))