cursorless icon indicating copy to clipboard operation
cursorless copied to clipboard

Support Python bodies for "short block"

Open pokey opened this issue 1 year ago • 1 comments

It would be nice if in the following:

def aaa():
    bbb;
    ccc;

    ddd;

Saying "short block bat" referred to

    bbb;
    ccc;

We could probably do it by creating a version of SurroundingPairInteriorScopeHandler that looks not just for surrounding pair interiors but also interiors of any tree-sitter scopes that have an interior

Although there is a case to be made that what "short block" really wants to be looking at is indentation level 🤔. Would be a very different impl than what we just made tho I think 😅

pokey avatar Jul 29 '24 17:07 pokey

That example sounds useful. Using indentation is in many ways simpler than what we are currently doing :D

AndreasArvidsson avatar Jul 30 '24 01:07 AndreasArvidsson