Add inline parameter hints to function calls in the editor #10732
Replies: 3 comments 2 replies
-
This would be great to have, both in Godot's script editor and the VS Code plugin! (I use the latter, and this feature doesn't appear for me when using GDScript). A while back I was interested in keyword arguments for GDScript and did a little reading about their feasibility of being implemented, and understood that it would be difficult due to the way the parser was built. I'd be a little worried that functionality like this would face the same hurdles (i.e., the parser not keeping track of argument names, and thus not being able to forward them to an editor). Someone more knowledgeable on the GDScript system may be able to provide more insightful commentary here, though. |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
This would be INCREDIBLY useful. Also, unlike the type hints, this should not have an inference issue. |
Beta Was this translation helpful? Give feedback.
-
If I have a function:
The function call looks like this:
It’s hard to know what the parameters refer to without looking at the function.
In VSCode, it's possible to turn on inline parameter hints. This shows the parameter name as a small comment next to the passed parameter. I don't know if VSCode will do this for GDscript, this example I found is, I think, C++:
If inline parameter hints were added to the Godot editor, code would be far easier to maintain. Here's a mockup:
Please note I am not suggesting passing arguments by name.
edit:
I believe this should be possible to implement, as the editor already knows the parameters names and shows them as a popup when coding:
Of course, these inline hints would have to be updated if the parameter names in the function definitions are edited.
Beta Was this translation helpful? Give feedback.
All reactions