-
-
Notifications
You must be signed in to change notification settings - Fork 97
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
Always display enum values first when autocompleting an enum #7913
Comments
I feel this shouldn't only be true for enums but all types. It seems as if it shows irrelevant things first, even when alphabetical is disabled in the settings. I feel it should order Auto completions with itself first followed by the parent then grandparent and so on... |
That's how it is supposed to work. Given the following class structure: class A:
...
class B extends A:
...
class C extends B:
... The autocompletion for something of type
If it doesn't work that way it is a bug and you should report it.
Regarding the proposal I like the idea, but implementing it could be hard. The sorting is done by the code edit, and is not tied to GDScript (it could also receive suggestions from another language) and so getting access to the declaration order is hard. We could abuse the |
I kind of understand, but to make matter more complicated, another thought was to display the class name to which the item belongs. It would be a different proposal altogether, but it makes sense, where the function/property is coming from.
I think unnamed Enums work as group of constants, so it should display as constants only, sorted alphabetically. It is not worth the effort to custom sort them though. |
Describe the project you are working on
Multiple Projects
Describe the problem or limitation you are having in your project
Currently during the autocomplete of an Enum type.
It is listed as given below:
The values of the enum are sorted in alphabetical order with all other functions and parameters. It will be more convenient if the values are at the top.
Describe the feature / enhancement and how it helps to overcome the problem or limitation
In the auto-complete menu all the values of the enum to be at the top as shown below:
There are two things to it.
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
listed above
If this enhancement will not be used often, can it be worked around with a few lines of script?
It will be used always
Is there a reason why this should be core and not an add-on in the asset library?
Autocomplete is part of core
The text was updated successfully, but these errors were encountered: