Transform RestructuredText docstrings to nice tooltips
Description
Hello! When writing Sphinx-style Python docstrings, the hover tooltip shows them in their native form i.e., without formatting. For instance, in this playground example, hovering over add shows the content as it is in the docstring.
Could we support proper rendering of these docstrings in the hover tooltips? There was a similar feature request in Pyright which was transferred over to Pylance which now supports this formatting (issue), albeit as an experimental feature.
Similarly, this could be extended to handling Google-style docstrings, that have headings like Args:. As an example, this is Pylance:
And this is Basedpyright:
Pylance is converting the Args to a markdown heading, and then indenting and splitting the parameters over lines, with the description below. I'm not sure how they'd do it, they must have some parser they're using that detects the docstring format. This expands to multiple places where there are hovers, such as hovering over variables and parameters too.
i've opened a separate issue for that: #1432
+1: It would be very helpful to see the part of Args: or equiv. specific to the parameter/argument I'm filling in.
I prefer the latter. The word "Args" unnecessarily occupies too much of my screen.