Skip to content

Improvement: method overriding聽#21343

Closed
Closed

Description

@im-n1

Hi guys,

I often override methods because Django 馃ぃ I was wondering if Code can help me override methods which whispers me. Like if I hit let's say SHIFT + Enter onto whispered row it would paste the original method definition.

Example:

I type:

def get_a

I get whispered:
image

I hit SHIFT + Enter and I get
image

Thank you and I'm sorry if this is duplicated task. I've looked around but found nothing.

Activity

  1. bpasero commented on Feb 24, 2017

    @bpasero
    Contributor

    I think this very much depends on the language you are using to provide this kind of information. I know for example that in TS we now have a quick fix to implement an interface but I would also love to get this into IntelliSense when I type in the body of the class.

    Assigning some people for fyi.

  2. mjbvz commented on Feb 24, 2017

    @mjbvz
    Contributor

    Benjamin Pasero (@bpasero) On the TypeScript side, microsoft/TypeScript#7158 tracks returning inherited methods in the suggestion list. This suggestion itself would not fill in the full signature , but we could leverage typescript.useCodeSnippetsOnMethodSuggest to do this

  3. im-n1 commented on Feb 25, 2017

    @im-n1
    Author

    For start (and I guess for 80% of cases) it would be cool enough just to make Code to write in the line that's currently whispering (just like in my screens).

    Thank you wery much, please keep Code making better and better 馃槈

  4. alexdima commented on Feb 27, 2017

    @alexdima
    Member

    grafa I think the best in this specific case is to create an issue in the Python extension you are using.

    I think our completion API is good enough to insert such an edit.

  5. im-n1 commented on Feb 28, 2017

    @im-n1
    Author

    So I should create the issue for every possible language that can override methods?

    There is really no way to implement feature in Code itself to be able to write in the current file when a keyboard shortcut is pressed on highlighted whispered item just like I've described in my first post?

    It seems to me like a pretty much easy solution that solves the problem and is good enough for 99% cases.

  6. mjbvz commented on Mar 4, 2017

    @mjbvz
    Contributor

    grafa Yes, I please open issues against the language where you would like to see this functionality. For Python, please file an issue against the Python extension: https://github.com/DonJayamanne/pythonVSCode/issues/new

    Thanks

  7. locked and limited conversation to collaborators on Nov 18, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

*extension-candidateIssue identified as good extension implementationfeature-requestRequest for new features or functionality

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions