Skip to content

Implement smart select #6669

Closed
Closed

Description

Activity

  1. added
    feature-request
    important
    triage-needed
    on Jul 22, 2019
  2. added and removed
    important
    on Jul 25, 2019
  3. ghost removed
    triage-needed
    on Jul 25, 2019
  4. added
    needs proposal
    and removed on Jul 30, 2019
  5. ogrisel commented on Jan 29, 2020

    @ogrisel

    Here an example of Python code:

    class MyClass:
    
        def method(self):
            value = [{"key 1": "value 1"}, {...}]
            return value
    

    For instance if the cursor placed on the "y" of "key 1", iteratively pressing shift+alt+right arrow should iteratively select:

    • the content of the string "key 1",
    • the content of the dict (between { and }),
    • the full dict expression ({ and } included),
    • the content of the list (between [ and ]),
    • the full list expression ([ and ] included),
    • the value local variable assignment statement (without the indentation spaces),
    • the line with the value local variable assignment statement,
    • all the lines in the body of the method,
    • all the lines of the method, "def" declaration included,
    • all the lines of the body class,
    • all the lines of the class, class declaration included,
    • the full file.

    At the moment, the smart select behavior works as expected for some of those steps but not all of them, in particular it does not understand the structure of Python strings, Python functions and classes.

  6. massich commented on Jan 30, 2020

    @massich

    +1

  7. added
    area-intellisense
    and removed on Apr 9, 2020
  8. kikyous commented on Aug 10, 2020

    @kikyous

    smart select is very helpful

  9. ogrisel commented on Jun 28, 2021

    @ogrisel

    It's been more than a year and I still think this is an important missing usability feature when editing Python code from VS Code.

  10. brettcannon commented on Jun 28, 2021

    @brettcannon
    MemberAuthor

    Olivier Grisel (@ogrisel) We don't disagree (hence why this is labeled needs spec), but it's the usual issue of simply finding the time to get to it. Plus this issue is sixth in terms of upvotes of items at the "needs spec" stage (that's ignoring issues we have not flagged to the stage of "needs spec"), so we potentially have stuff people are requesting ahead of this.

    But I did make sure that it is list on our roadmap somewhere so it doesn't get lost.

  11. WizardUli commented on Oct 24, 2021

    @WizardUli

    Layman question: Is this just a [missing feature / issue] of specific language servers (pylance, jedi) or does it also need changes in this plugin? Thanks.

  12. brettcannon commented on Oct 25, 2021

    @brettcannon
    MemberAuthor

    grawp it can technically be done either via LSP or in the extension. Specifically for LSP, it is implemented via the selectionRange request. The issue in Pylance for this is microsoft/pylance-release#266 .

  13. brettcannon commented on Jan 25, 2022

    @brettcannon
    MemberAuthor

    This was implemented in the 2021.12.1 release of Pylance!

    microsoft/pylance-release#266

  14. locked as resolved and limited conversation to collaborators on Feb 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

area-intellisensefeature-requestneeds proposalpartner ask

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions