You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I should be able to type f inside the body of Sub and get a suggestion for foo that fills in the entire signature of the method when accepted:
classSubextendsBase{foo(param1: string,param2: boolean): Promise<void>{|// cursor ends up here}}
Right now, accepting the suggestion for foo only inserts the text foo. I have to fill out the entire body of the method myself, typically by copy and pasting from the base class
We should be able to use VS Code's snippet syntax for this style of completion. I originally proposed snippet style completions in #25207. It sounds like we have already have adopted a subset of VS Code's snippet string syntax
This would need to be an opt-in feature for editors and we would likely need to add a user facing setting to disable these too
A general question I have about these snippet completions that may insert quite a bit of text is how we want to display them. Xcode has these kinds of method signature completions and it looks like they just truncate, which isn’t too bad:
It’s somewhat less clear how #40700 should display, for example, which is another use case I’m interested in exploring.
I think we can start by using the full method signature text as the label like Xcode does here and see how we like it. Matt Bierner (@mjbvz) pointed out that the Editor > Suggest: Preview setting is particularly useful for longer snippet completions, and we may want to explore enabling it by default, at least for snippet-text completions.
I've wanted this one for so long and assumed it was already suggested, but didn't know what to search for. I'm surprised it only got added to the tracker last month — this would be such a huge usability enhancement for implementing abstract classes! It's honestly one of the only reasons why I sometimes miss working on Java projects 😜
Will this completion automatically propagate visibility modifiers? IE, if the superclass has public/protected, will the completion add the same visibility to the override? Also, will it add the override modifier if the user has the noImplicitOverride flag enabled? Both of those kinds of modifiers being included with these completions would be great.
Will this completion automatically propagate visibility modifiers? IE, if the superclass has public/protected, will the completion add the same visibility to the override? Also, will it add the override modifier if the user has the noImplicitOverride flag enabled? Both of those kinds of modifiers being included with these completions would be great.
I've been working on implementing this feature, and the override modifier is going to be added if noImplicitOverride is set (modulo possible bugs, of course 😅). About visibility modifiers, I think the suggested method should have them too, but I have yet to test that behavior.
Glad to hear feedback about this feature 😊
Activity
mjbvz commentedon Sep 1, 2021
We should be able to use VS Code's snippet syntax for this style of completion. I originally proposed snippet style completions in #25207. It sounds like we have already have adopted a subset of VS Code's snippet string syntax
This would need to be an opt-in feature for editors and we would likely need to add a user facing setting to disable these too
andrewbranch commentedon Sep 1, 2021
A general question I have about these snippet completions that may insert quite a bit of text is how we want to display them. Xcode has these kinds of method signature completions and it looks like they just truncate, which isn’t too bad:
It’s somewhat less clear how #40700 should display, for example, which is another use case I’m interested in exploring.
andrewbranch commentedon Sep 1, 2021
I think we can start by using the full method signature text as the label like Xcode does here and see how we like it. Matt Bierner (@mjbvz) pointed out that the
Editor > Suggest: Previewsetting is particularly useful for longer snippet completions, and we may want to explore enabling it by default, at least for snippet-text completions.ChiriVulpes commentedon Oct 11, 2021
I've wanted this one for so long and assumed it was already suggested, but didn't know what to search for. I'm surprised it only got added to the tracker last month — this would be such a huge usability enhancement for implementing abstract classes! It's honestly one of the only reasons why I sometimes miss working on Java projects 😜
Will this completion automatically propagate visibility modifiers? IE, if the superclass has
public/protected, will the completion add the same visibility to the override? Also, will it add theoverridemodifier if the user has thenoImplicitOverrideflag enabled? Both of those kinds of modifiers being included with these completions would be great.gabritto commentedon Oct 12, 2021
I've been working on implementing this feature, and the
overridemodifier is going to be added ifnoImplicitOverrideis set (modulo possible bugs, of course 😅). About visibility modifiers, I think the suggested method should have them too, but I have yet to test that behavior.Glad to hear feedback about this feature 😊