-
Notifications
You must be signed in to change notification settings - Fork 30k
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
"editor.suggestSelection": "recentlyUsed" frozen? #77254
Comments
Please provide repro steps |
OK, took me some experimenting to figure out how to reproduce this, but think I figured it out.
{
// // TODO: See if TypeScript has the same issue
// "typescript.suggest.completeFunctionCalls": true,
// `completeFunctionCalls` appears to be the problematic setting
"javascript.suggest.completeFunctionCalls": true
}
const num = 1;
const str = 'foo';
|
@jrieken Thanks for the investigation. Here's more detail on why this is happening:
Do you think this is something we could fix in VS Code itself? Any potential workarounds? We can't eagerly resolve the insert text for JS/TS as that can be an expensive operation |
⬆️ That is the issue, actually the cause of multiple issues. The resolve-call should never change the insert behaviour of a completion. It was a mistake not to enforce that because it's the root of much evil.
I honestly think we must do that. With #73311 we already realised that items must be resolved asap and that we cannot wait once we show them. The only fix on our side I see is to forcefully call resolve before showing items - defeating the purpose of resolve... |
Ok, I will look to see what the cost of creating the insert text eagerly and if it is even possible to do with the existing TS api |
Ok, I investigated this and found we cannot fix this on the JS/TS side without dropping support for The reason is that This request against TS may be relevant: microsoft/TypeScript#25207 Moving to backlog since I don't know how to fix it this iteration |
Closing this due to lack of further user feedback over the past year. Long term, I feel that we should move |
In certain files of a project, I'm apparently getting a recently used completion that I can't reset (I've tried all the clear commands).
But more importantly than being able to reset it, it seems like "recently used" could be improved on to take into account more factors (e.g. context and how recently).
See the screenshot below, where a word suggestion continues to be selected regardless of how many times I autocomplete something else (i.e.
slice
).The text was updated successfully, but these errors were encountered: