Skip to content
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

parameter Hints in autocompletion preview - to show expected type of variable and other info #4569

Closed
blurymind opened this issue May 6, 2016 · 6 comments

Comments

@blurymind
Copy link

blurymind commented May 6, 2016

  1. The editor and gdscript are not consistent with the value type they take for rotations
    A hint about set_rot() type of expected variable would have helped me avoid a bit of confusion here:
    Ways Gdscript could be more user friendly and accessible  #4516 (comment)
    This is an example of how in some cases your code might parse successfully, but not do what you expect.
  2. In order to know the type of variable that is expected in a function or a method, you need to search the class api documentation explicitly.
    In game maker, the auto - completion gives hints like this:
    autocomplete_image
    So no need to search for this, the actual autocompletion is showing you immediately what type of value or syntax it expects!

Godot has no hints whatsoever.

To make this even more awesome than godot, gamemaker users can write hints for their own functions parameters. Defining a hint is as simple as:
intelligent-code-completion

http://gamemakerblog.com/2014/01/02/how-to-add-intelligent-code-completion-to-scripts/

This is a common feature of many other code editors.
Look at how nice it is in superpowers game engine:
kii8xad

This makes them easier to learn or transition to!

@akien-mga
Copy link
Member

Well... Godot has autocompletion preview, I'm not sure what you're asking for.

@akien-mga
Copy link
Member

spectacle a11433
spectacle s11433

@blurymind
Copy link
Author

blurymind commented May 6, 2016

Actually I found out that another user has filed this last year:
#2378

this is the first thing. Autocompletion hinting is not very obvious. In other environments, the hints are shown in the results as you search. In godot you have to hit enter for the hint to appear. For that reason I wasnt getting the hints and realized it when another user on the issue tracker explained it.
Perhaps at least show the hint of the active selected item as you cycle through the results? Very often people dont hit enter at that precise moment.

The second thing is showing more information in the actual hint. set_rot () is a good example, because godot's hint does not tell the user that the value needs to be in radiants. Everywhere a radiant type float is expected - the hint should note that - so the user knows when it needs to be converted.
A bit more information as what it does would be nice too of course.

:)

But thats about it. I guess you can mark this as a duplicate of #2378

@neikeq
Copy link
Contributor

neikeq commented May 7, 2016

I am not sure what exactly you are asking for, but it looks like a duplicate of #4370.

Well, that issue is about documentation generation. But the approach to document functions is the same as you would use for this.

@blurymind
Copy link
Author

I guess I am asking for the function hints to also show up on autocompletion.
This:
autocomplete_image
Packs a lot more information than this:
2e7f5eb8-13d6-11e6-814e-606d930f0196

The current way only shows hints once you settle for a function/method.
I guess it's not that bad as it is. Maybe I should close this feature request? We don't need it that badly

@Calinou
Copy link
Member

Calinou commented Dec 7, 2019

This was implemented by #29744, closing.

Autocompletion

@Calinou Calinou closed this as completed Dec 7, 2019
@akien-mga akien-mga added this to the 3.2 milestone Dec 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants