Open marcantonio opened 1 month ago
Thanks for this package.
Is it possible to select the block based only on the line the cursor is on, vs now the cursor needs to be in the block. For example:
class foo { * fn bar() {| } }
Now it seems that to fold bar the cursor must be at |. Folding at * folds foo. I'd like to be able to fold bar from *.
bar
|
*
foo
Hopefully that makes sense!
If not available now, would you be interested in a PR?
treesit-fold is designed to provide only the basic folding functionality. I recommend you wrap the folding logic yourself. 🤔
treesit-fold
This is what I used, and it has similar functionality you have described:
https://github.com/emacs-vs/vs-edit-mode/blob/d800bd246107af657027b95e83229a74309d0a2c/vs-edit-mode.el#L401-L470
Thanks for this package.
Is it possible to select the block based only on the line the cursor is on, vs now the cursor needs to be in the block. For example:
Now it seems that to fold
bar
the cursor must be at|
. Folding at*
foldsfoo
. I'd like to be able to foldbar
from*
.Hopefully that makes sense!
If not available now, would you be interested in a PR?