Hi Eli and Yuan! I've added a function to treesit.el, for use in treesit-major-mode-setup. Because the treesit-defun-type-regexp gives us "defuns" for free, we can set fill-paragraph-function to this new function, thus enabling quick formatting, and some sensible default for fill-paragraph. It aims to mirror c-indent-defun. I think this is a nice way to get this functionality for free, but I'm not 100% whether this is considered ok or not. An alternative could be to add a 'treesit-mode-map' where we can auto-enable such constructs. Feel free to apply if it looks ok. Theo