Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Python bodies for "short block" #2600

Open
pokey opened this issue Jul 29, 2024 · 1 comment
Open

Support Python bodies for "short block" #2600

pokey opened this issue Jul 29, 2024 · 1 comment
Labels
lang-python Issues related to Python programming language support

Comments

@pokey
Copy link
Member

pokey commented Jul 29, 2024

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 😅

@AndreasArvidsson
Copy link
Member

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

@auscompgeek auscompgeek added the lang-python Issues related to Python programming language support label Oct 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lang-python Issues related to Python programming language support
Projects
None yet
Development

No branches or pull requests

3 participants