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
When I type method names into any built in function expecting a Callable, such as Signal's connect, disconnect, is_connected, etc. the text editor adds parentheses by default. In pretty much every case, I don't actually want the parentheses there. This also causes a problem where backspacing twice will delete one of the surrounding method parentheses, e.g. connect's, thereby adding more keystrokes and annoyance.
Describe the feature / enhancement and how it helps to overcome the problem or limitation
I propose a mechanism in GDScript and the text editor where it will intelligently defer creating parentheses whenever a method name is tab completed inside a method call expecting a Callable argument. If the user then types a method of Callable, such as bind, then the parentheses can be tab completed just fine. In addition, if possible, you could even extend this behavior to assigning variables that have been typed as Callable, meaning assigning the variable would also not auto-complete the parentheses.
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
Pretty simple in concept, not sure about the execution: just don't add () at the end of a tab completed method name when that method is being placed into a variable/method parameter that is expected to be of type Callable.
If this enhancement will not be used often, can it be worked around with a few lines of script?
I don't know of any way this behavior could be added to the text editor or GDScript itself.
Is there a reason why this should be core and not an add-on in the asset library?
I think this is a built-in part of how the text editor and GDScript interact with each other.
The text was updated successfully, but these errors were encountered:
Describe the project you are working on
Any project that uses GDScript.
Describe the problem or limitation you are having in your project
When I type method names into any built in function expecting a
Callable
, such asSignal
'sconnect
,disconnect
,is_connected
, etc. the text editor adds parentheses by default. In pretty much every case, I don't actually want the parentheses there. This also causes a problem where backspacing twice will delete one of the surrounding method parentheses, e.g.connect
's, thereby adding more keystrokes and annoyance.Describe the feature / enhancement and how it helps to overcome the problem or limitation
I propose a mechanism in GDScript and the text editor where it will intelligently defer creating parentheses whenever a method name is tab completed inside a method call expecting a
Callable
argument. If the user then types a method ofCallable
, such asbind
, then the parentheses can be tab completed just fine. In addition, if possible, you could even extend this behavior to assigning variables that have been typed asCallable
, meaning assigning the variable would also not auto-complete the parentheses.Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
Pretty simple in concept, not sure about the execution: just don't add
()
at the end of a tab completed method name when that method is being placed into a variable/method parameter that is expected to be of typeCallable
.If this enhancement will not be used often, can it be worked around with a few lines of script?
I don't know of any way this behavior could be added to the text editor or GDScript itself.
Is there a reason why this should be core and not an add-on in the asset library?
I think this is a built-in part of how the text editor and GDScript interact with each other.
The text was updated successfully, but these errors were encountered: