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

Add Type Information and Documentation on Hover in Godot Editor #8393

Closed
sandygk opened this issue Nov 10, 2023 · 2 comments
Closed

Add Type Information and Documentation on Hover in Godot Editor #8393

sandygk opened this issue Nov 10, 2023 · 2 comments
Labels

Comments

@sandygk
Copy link

sandygk commented Nov 10, 2023

Describe the project you are working on

N/A every project could benefit from this.

Describe the problem or limitation you are having in your project

The current Godot script editor lacks the feature to quickly view information about variables or functions by hovering over them. This leads to frequent interruptions in the coding flow, as I need to manually search for documentation or recall the specifics of certain elements in my code.

Describe the feature / enhancement and how it helps to overcome the problem or limitation

The proposed feature would allow users to hover their cursor over a variable or function in the Godot script editor to display a tooltip. This tooltip would show the type, a brief description, and a link to the relevant documentation. This mirrors the functionality seen in Visual Studio Code and would significantly enhance the efficiency and convenience of coding in Godot, especially for large projects or when learning new aspects of the engine.

Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams

Upon hovering over a variable or function, a small, context-sensitive box appears near the cursor. This box would contain:

The type of the variable/function.
A brief description (extracted from Godot's documentation).
A clickable link that takes the user directly to the corresponding documentation page.
For instance, hovering over a Vector2 variable would show its type ('Vector2'), a short description ('A 2D vector used for various calculations'), and a link to the Vector2 documentation in Godot's official docs.

Here is an example with a function:
image

and another example where the inferred type is displayed, not the type name on the tooltip acts as a link to the documentation:

image

The screenshots are from VSCode using the godot-tools extension.

If this enhancement will not be used often, can it be worked around with a few lines of script?

This type of integrated development environment (IDE) feature is not feasible to implement effectively through a script or plugin. Its integration into the core editor is essential for a seamless and native user experience.

Is there a reason why this should be core and not an add-on in the asset library?

Having this feature as part of the core Godot editor is crucial for providing a consistently efficient development experience.

@YuriSizov
Copy link
Contributor

Thanks for your suggestion. It's a duplicate of #1393, so consolidating.

@sandygk
Copy link
Author

sandygk commented Nov 10, 2023

Oh perfect! Thanks 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants