Style variables in docstring shown on hover #2973
Replies: 3 comments 6 replies
-
Moving this issue to discussion as an enhancement request for comments and upvotes. |
Beta Was this translation helpful? Give feedback.
-
That would be awesome! I find it difficult to read the docs of a function on the hover view. Specially because the docstring is parsed as markdown, which results in function arguments not being separated in a separate line (maybe this is already solved?). I also wish it could be easier to distinguish the documentation of the different attributes of a function. Using a different color or bold text for the function arguments in the docstring would be very helpful. |
Beta Was this translation helpful? Give feedback.
-
All I really want is for VSCode to render Python docstrings the same way it renders JSDoc comments - italicizing the |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Does pylance attempt to parse variables present in the docstring (under
Args
in the following example), like the variable name (a
), type (int
) and comment (My really long...
)?This docstring is shown as follows on hover (or Cmd + Shift + Space). It can sometimes be challenging for the reader to distinguish whether a new line marks the beginning of a variable's docs, or the continuation of the previous line.
It would be wonderful if these could be styled by font or colour to make them more clearly distinguishable when reading the docstring. If these properties could be accessed through VSCode json settings, it could allow people to customize the view themselves.
I realise that pylance probably can't do this, but I thought I'd check, since I can't work out from the docs how pylance parses it. (I've read #1848)
Beta Was this translation helpful? Give feedback.
All reactions