-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Return completions in alphanumeric order #57742
Comments
Please share a complete, self contained code example as text |
here's complete code
|
@jrieken I think this is generic suggest feature request to use alphanumeric sorting |
@jrieken Ok thanks, will move upstream to get TS returning the items in the correct array order. That may be easier than changing the sortText Example response today showing the wrong order:
|
What's the bug here? The export const SortText = {
// Presets
LocalDeclarationPriority: "10" as SortText,
LocationPriority: "11" as SortText,
OptionalMember: "12" as SortText, The items are coming back in lexical string ordering; VS Code can reorder those if that's desired |
I think there are different understandings of @RyanCavanaugh So the ask is that TS sorts its suggestion in lexical order (in this case) or in the order declaration (in this case) because TS is has the most complete knowledge |
It is sorted. |
Within the same What we'd like is for this to use an alphanumeric sort. This may be as simple as adding TypeScript/src/compiler/core.ts Line 2256 in b5b6048
|
Hello, I'm working with TypeScript in Visual Studio Code and I've noticed that the autocomplete suggestions for union types are not displayed in a logical order. Specifically, I have a union type for column sizes in a grid layout system:
The text was updated successfully, but these errors were encountered: