Open sshilovsky opened 2 years ago
You can enable type hint generation for autocompletion in the editor settings (which also applies to signal function creation). This feature is disabled by default as it could be confusing for beginners, but maybe it's time to enable it by default for 4.0.
I always thought the two should be split, somehow. As in, type hint generation for normal methods, and type hint generation for signals.
For example, I personally don't like to see _process(delta: float)
being generated because it's a method I see very frequently, thus specifying the type feels redundant, and the autocompletion works even without float
.
# Autocomplete example:
func _physics_process(delta: float) -> void:
the returned type void
is probably redundant though.
Describe the project you are working on
I'm working with godot tutorial currently
Describe the problem or limitation you are having in your project
The code editing experience could be improved a little. Currently, lack of type definition in a generated method's argument disables autocompletion of the argument's own methods. For example:
Describe the feature / enhancement and how it helps to overcome the problem or limitation
Include argument types declaration when generating signal handlers or overridden virtual methods.
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
If this enhancement will not be used often, can it be worked around with a few lines of script?
Yes, the arguments' types can be filled in manually.
Is there a reason why this should be core and not an add-on in the asset library?
Yes, because this is a core feature that should be available by default.