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

Improvement: method overriding #21343

Closed
im-n1 opened this issue Feb 24, 2017 · 6 comments
Closed

Improvement: method overriding #21343

im-n1 opened this issue Feb 24, 2017 · 6 comments
Assignees
Labels
*extension-candidate Issue identified as good extension implementation feature-request Request for new features or functionality

Comments

@im-n1
Copy link

im-n1 commented Feb 24, 2017

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.

@roblourens roblourens added the feature-request Request for new features or functionality label Feb 24, 2017
@bpasero
Copy link
Member

bpasero commented Feb 24, 2017

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.

@bpasero bpasero added the editor label Feb 24, 2017
@bpasero bpasero assigned jrieken, alexdima and mjbvz and unassigned bpasero Feb 24, 2017
@mjbvz
Copy link
Collaborator

mjbvz commented Feb 24, 2017

@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

@im-n1
Copy link
Author

im-n1 commented Feb 25, 2017

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 😉

@alexdima
Copy link
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.

@alexdima alexdima added *extension-candidate Issue identified as good extension implementation and removed editor labels Feb 27, 2017
@alexdima alexdima removed their assignment Feb 27, 2017
@jrieken jrieken removed their assignment Feb 27, 2017
@im-n1
Copy link
Author

im-n1 commented Feb 28, 2017

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.

@mjbvz
Copy link
Collaborator

mjbvz commented Mar 4, 2017

@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

@mjbvz mjbvz closed this as completed Mar 4, 2017
@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 18, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
*extension-candidate Issue identified as good extension implementation feature-request Request for new features or functionality
Projects
None yet
Development

No branches or pull requests

6 participants