Something I do often in #emacs is to have to copy the current function name to my clipboard (usually for running my e2e test or other grep)
here is a little function that uses treesitter to grab the function and copy it to your kil-ring
(defun my-copy-function-name-with-ts()
(interactive)
(let ((funcname
(substring-no-properties
(treesit-node-text
(treesit-node-child-by-field-name (treesit-defun-at-point) "name")))))
(kill-new funcname)
(message "Copied name: %s" funcname)))