3

Is it possible to have VSCode show a Python method's online documentation upon mouse-over/hover?

For example, PyTorch API Docs are hosted online and the method hierarchy is simple to navigate. When I hover of a method from the PyTorch library, I'd like to see the API documentation from that URL, not just the various method signatures.

This feature is available to Java Developer using Eclipse: The user can configure Eclipse to pull API documentation from a URL (e.g., the List API JavaDocs) on a project-by-project basis. Here's an example of the popup that shows up in Eclipse for the List.of() method:


enter image description here


Notice that along with the method signature is a short description of the method ("returns an unmodifiable list...") along with additional helpful information (e.g., Type parameters, Parameters, and Returns)

To clarify: I'm not only looking for a popup showing the method signature(s), but also the associated documentation. For example: VSCode only displays the method signatures for torch.rand(), but the PyTorch API documentation includes the full description.

2
  • 1
    Usually, this is provided by python language server. It may be pylance or jedi. It sounds like a new function request. It would be a better way to request this function to developers in github. Commented Jan 20, 2023 at 1:22
  • Thanks for the suggestion @MingJie-MSFT : I submitted a feature request here but I'm keeping the question open here in the off chance that someone has a current working solution. Commented Jan 20, 2023 at 1:44

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.