code --disable-extensionsAutocomplete - it's very useful option of IDE. But vscode do it sometimes not good.
First of all we need to improve autocomplete sort priority by default.
const autocompleteSortPriority = [
// example
/* 1 */'possible reserved words' // `for`, `extends` etc, if it won't throw SyntaxError
/* 2 */'lexical environment', // in current file
/* 3 */'snipets',
/* 4 */'global scope', // and auto exports
/* 5 */'not need at all',
]
Current (wrong) behavior:
Wrong order, 'lexical environment' not use at all.
Wrong order
"2" - not use at all
extends_for_test_variablemust be aftereee_variable.
The could be a lot of examples to add. So, it is possible to improve autocomplete sort priority by this simple ruls?
And much better, if we could customize autocompleteSortPriority in settings of possible ruls list.
I had a settings.json error which caused bad autocompletion (snippetSuggestions: top).
Maybe check out these settings:
"editor.snippetSuggestions": "bottom",
"editor.suggest.localityBonus": true,
"editor.suggest.filterGraceful": true,
"editor.suggest.snippetsPreventQuickSuggestions": true,
Is this suggestion still being considered? Asking since we recently got a new feature for #45039 (also see #71084) and it's kind of related...
I think this is still needed. Suggestions based on the scope are the most natural thing.
I like having text suggestions around, but they are the least interesting to me, so they should be put at the bottom of the list. There they can be ordered either alphabetically or by the localitybonus.
When get intellisense for properties of an object, they should be on top of the list.
On the other hand, in a string, string suggestions are more useful.
Local scope should definitely get priority by default IMO, in Go's case you get a bunch of import suggestions for packages you're not even using before you get a local variable
For js/ts, we improved the default sorting order with https://github.com/microsoft/TypeScript/issues/15024
@jrieken I feel @randrade23 is correct that this feature request is similar to #45039 and could be handled in core VS Code in some way. Assigning back to you for more feedback
How do I get object properties to the top of the suggestions? I'd rather get properties listed first than unrelated snippets from emmet
This issue is being closed to keep the number of issues in our inbox on a manageable level, we are closing issues that are not going to be addressed in the foreseeable future: We look at the number of votes the issue has received and the number of duplicate issues filed. More details here. If you disagree and feel that this issue is crucial: We are happy to listen and to reconsider.
If you wonder what we are up to, please see our roadmap and issue reporting guidelines.
Thanks for your understanding and happy coding!
This is mostly covered with #45039 - which we have shipped a while back
This is mostly covered with #45039 - which we have shipped a while back
But I think the priority ordering part has not been covered, which I think is the main point here.
This is mostly covered with #45039 - which we have shipped a while back
But I think the priority ordering part has not been covered, which I think is the main point here.
I agree! I'm googling to try and figure out how to configure the order. Personally I want all the methods together and all the snippets together etc. and to be able to order methods before snippets etc.
Most helpful comment
But I think the priority ordering part has not been covered, which I think is the main point here.