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 CompletionEntry.isRecommended from TypeScript #40325

Closed
mjbvz opened this issue Dec 16, 2017 · 3 comments
Closed

Support CompletionEntry.isRecommended from TypeScript #40325

mjbvz opened this issue Dec 16, 2017 · 3 comments
Assignees
Labels
feature-request Request for new features or functionality javascript JavaScript support issues typescript Typescript support issues verification-needed Verification of issue is requested verified Verification succeeded
Milestone

Comments

@mjbvz
Copy link
Collaborator

mjbvz commented Dec 16, 2017

Feature request
TS 2.7 adds a new isRecommended property on CompletionEntry (microsoft/TypeScript#20020) This is marked so we can figure out that a type makes sense in a given location. We should observe this property in VS Code to order our completions

@mjbvz mjbvz added javascript JavaScript support issues typescript Typescript support issues labels Dec 16, 2017
@mjbvz mjbvz self-assigned this Dec 16, 2017
@mjbvz mjbvz added the feature-request Request for new features or functionality label Dec 16, 2017
@mjbvz mjbvz added this to the December 2017/January 2018 milestone Dec 16, 2017
@mjbvz mjbvz closed this as completed in d3decc7 Dec 16, 2017
@mjbvz mjbvz added the verification-needed Verification of issue is requested label Jan 29, 2018
@jrieken jrieken added the verified Verification succeeded label Jan 30, 2018
@jrieken
Copy link
Member

jrieken commented Jan 30, 2018

Verified, however it does conflict with how we memorise suggestions.... @mjbvz Maybe we shouldn't change the sorting but expose something like selectedCompletionIndex on the CompletionResult. That's hard to merge, in case of multiple providers and multiple occurrences, but worth a try.

@mjbvz
Copy link
Collaborator Author

mjbvz commented Jan 30, 2018

@jrieken Yes actually suggest memory messes up other sorting smartness like #40311 as well

Could we could borrow the TS concept of isRecommended on completion items?

@jrieken
Copy link
Member

jrieken commented Jan 31, 2018

Yeah, we can think of exposing something in the API and that will then over-rule the memory. Not sure if a boolean is the best (as it allow all items to be recommended)

@vscodebot vscodebot bot locked and limited conversation to collaborators Feb 3, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature-request Request for new features or functionality javascript JavaScript support issues typescript Typescript support issues verification-needed Verification of issue is requested verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

2 participants