Open linkpy opened 4 years ago
Been investigating LSP issues and got to this one.
The current issue I'm facing is that hovering over a variable/function/class and holding down the ctrl
key sends a "definition" request, which is the same thing it sends when pressing F12
or doing a ctrl
+click
. I can modify GDScriptTextDocument::definition()
to detect if we're over a native symbol that would have a documentation page, but if I make it open the documentation directly in that function, it'd do it before the click even occurs.
In the meantime, you can get around that by sending a "declaration" request (in VSCode that's right click: Go To Declaration). If you have your LSP server's Show Native Symbols In Editor turned off, that will open the native symbol's documentation in VSCode.
Godot version: 3.2.3
OS/device including version: Linux Mint
Issue description: When doing Ctrl+Click on a builtin name (
print
,Node
, ...), the LSP server doesn't give any information back.Related to https://github.com/godotengine/godot-vscode-plugin/issues/205.
Steps to reproduce: Write
extends Node
in a file. Ctrl-ClickNode
.Minimal reproduction project: /
Notes: The expected behaviour, on the VSCode plugin side would be to open the documentation of the clicked element, which is possible to do and which is already implemented. For this the LSP server could just return a special location (for example, a JSON object like so
{"documentation": true, "class": "@GDScript", "member": "print"}
) which can be caught by the extension to open the relevant webviewer to show the documentation of the item or by adding a custom message, just telling VSCode to open a given class documentation.