-
-
Notifications
You must be signed in to change notification settings - Fork 99
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
Improve autocompletion display in the script editor #11079
Comments
Overall I'm against colored text in the completion options. However I think we could combine the idea with the fact that our completion type icons tend to be hard to distinguish at a glance. Maybe adding differently colored circles behind certain completion icons could make it easier to tell the types apart, while still maintaining readability. |
Why should signals be displayed with braces? The only context where this is valid is the declaration, which doesn't get autocompletion. I believe the display text should be a representation of what the user is going to get, not of how it was declared. |
Then what if a signal contains arguments? If a signal does not contain parameters, I think yours would better, but when it comes to one with them, would a user will know from autocompletion if this signal contains arguments, without checking docs? |
Added some new improvements I thought can be done in the future. For the improvement of method adding braces following, see the pr godotengine/godot#99102 |
godotengine/godot#94196 has implemented an icon for local variables, which is also a part of this proposal. Thanks the author for this contribution :D |
Describe the project you are working on
GDScript source-code debugging, GDScript-based projects
Describe the problem or limitation you are having in your project
This topic started from godotengine/godot#98557 and dev chat when I posted some progress about using different color to distinguish private and protected members from normal ones. That day, Mickeon mentioned unwield auto-completion of GDScript: The icons "are not good to glance at." (Mickeon)
Meanwhile, the incoherence of typing signature beginning with
_
afterfunc
has brought extending question: If you looking at literally the identifiers in the auto-completion list, chances are that you cannot quickly distinguish properties from functions and signals, because they don't have()
as the ending, which also makes the icon completely an attribute rather than hinter.So, it's time to get everything improved.
Describe the feature / enhancement and how it helps to overcome the problem or limitation
and signals. If the method contains arguments, adding...
in the brackets (Done):a) When the argument requires a type, displays the best-match result and then other type. for example:
Here
->
will display the properties inint
type first and then the other types.b) When it requires a callable, using callable icon for the methods displayed:
where
->
will be like:And remove the braces on tabbing.
(Not sure if a
.bind()
should be inserted after a callable with arguments)4. Like VS2022, improve completion of some control-flow keywords, which is an option settable in editor settings:
More will be added, feel free to propose your idea here :)
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
The
gdscript_editor.cpp
andeditor_theme_manager.cpp
are the main places to achieve this, and by editing the relative code pieces, this will be done as quick as possible.If this enhancement will not be used often, can it be worked around with a few lines of script?
No, as this requires modification of source code.
Is there a reason why this should be core and not an add-on in the asset library?
This requires modification of source code.
Pull-requests:
The text was updated successfully, but these errors were encountered: