You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the problem or limitation you are having in your project
GDScript supports using constants as types, e.g. const MyType = preload("res://script/path.gd") and afterwards var my_object: MyType etc. It's a nice feature if you don't want to pollute global namespace. However these "types" are not suggested in autocompletion, so e.g. if you write var my_object: MyT, the type won't be suggested.
Describe the feature / enhancement and how it helps to overcome the problem or limitation
It would be useful if type constants were available for autocompletion. Both local constants (MyType) and external ones (ClassName.MyType).
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
The editor is able to determine when to complete for type hint. "Constant types" are just constants of type Script, so they could be added to the type autocompletion list.
If this enhancement will not be used often, can it be worked around with a few lines of script?
No.
Is there a reason why this should be core and not an add-on in the asset library?
Built-in autocompletion can't be extended.
The text was updated successfully, but these errors were encountered:
Describe the project you are working on
Complex GDScript-based project.
Describe the problem or limitation you are having in your project
GDScript supports using constants as types, e.g.
const MyType = preload("res://script/path.gd")
and afterwardsvar my_object: MyType
etc. It's a nice feature if you don't want to pollute global namespace. However these "types" are not suggested in autocompletion, so e.g. if you writevar my_object: MyT
, the type won't be suggested.Describe the feature / enhancement and how it helps to overcome the problem or limitation
It would be useful if type constants were available for autocompletion. Both local constants (
MyType
) and external ones (ClassName.MyType
).Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
The editor is able to determine when to complete for type hint. "Constant types" are just constants of type Script, so they could be added to the type autocompletion list.
If this enhancement will not be used often, can it be worked around with a few lines of script?
No.
Is there a reason why this should be core and not an add-on in the asset library?
Built-in autocompletion can't be extended.
The text was updated successfully, but these errors were encountered: