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

Show method/class documentation on ctrl+click #205

Closed
nanoblit opened this issue Jun 27, 2020 · 5 comments
Closed

Show method/class documentation on ctrl+click #205

nanoblit opened this issue Jun 27, 2020 · 5 comments

Comments

@nanoblit
Copy link

Currently as far as I know you can go to the documentation from the command palette and find whatever class you want to look up. It would be nice if the documentation would open scrolled to the correct method on ctrl + click.

@Razoric480
Copy link
Contributor

Ctrl + click is already being used to travel to a function call's definition (provided it's user made.) But it'd be nice to have some easy way of finding a function in the documentation from its use, though, yes.

@Calinou
Copy link
Member

Calinou commented Jun 27, 2020

The documentation for built-in methods should already display if you hover them with the mouse for roughly one second. As for user-made methods, that's not supported in GDScript yet (there's no standard syntax for it). That said, this extension could use the comment line(s) above the variable/method declaration as a docblock like the C++ extension does.

@linkpy
Copy link
Contributor

linkpy commented Oct 29, 2020

This feature can be implemented, tho it must go through the LSP server.

When you hover a user-defined variable, the LSP server will communicate where is that variable defined, making Ctrl+Click to work. In the case of a predefined name (class names, GDScript's functions, ...) the same request is sent to the server, but the later returns no information at all.

Opened godotengine/godot#43188 to see if we can have the necessary addition to the LSP server so this can be implemented in the addon.

@Ramh5
Copy link

Ramh5 commented Feb 2, 2021

I can right click on a built-in method, select "go to declaration", it opens a tab with the declaration, then I can click on the class of that method and it opens another tab with the documentation. Is there a less convoluted way to do that? In the Godot editor it is a a simple ctrl-click. For example in this old video I can see GDQuest can click on the popup and get the documentation. Unfortunately clicking anywhere on the popup does nothing on my installation.

@DaelonSuzuka
Copy link
Collaborator

Type documentation is currently available in VSCode by right-clicking on a typed variable and selecting "Godot Tools: Open Type Documention". I am currently working on making this feature available in more circumstances (methods of builtin types, for instance).

image

This issue was closed.
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

6 participants