-
Notifications
You must be signed in to change notification settings - Fork 768
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
Improve formatting of parameter hints (call tooltips) #1849
Comments
I don't see a "hardbreaks" issue with I have edited the issue accordingly. |
This is interesting, notice how well the documentation for There original has hard breaks like this:
Some kind of processing is happening there, don't you think? |
Agree, can you please comment these queries on the upstream jedi issue. The maintainers of jedi would know more about it. |
Do these better formatted queries also come already formatted from jedi? |
We do post-processing of this |
productivity with parameter hint in vscode could have monospace font and rendered in pre tag by default; how to write in free typing, consistent documentation in vscode [?] |
As with #1848, I believe this is fine in Pylance. |
Environment data
Expected behaviour
Tooltip text flows naturally disregarding hard breaks in the original docstring.
Actual behaviour
Natural text flow is interrupted because of the interaction between the width of the tooltip popup and the location of hard breaks in the docstring (which assume a larger viewport).
ISSUE HERE
Hardbreak after "input" interrupt the natural flow.
Steps to reproduce:
JEDI AS INTELLISENSE IS SELECTED
import torch
torch.nn.Conv2d(
Some suggestions
Many editors (vscode included) provide heuristic text formatters as builtins or as extensions.
Alt-q
(fill-paragraph) https://www.gnu.org/software/emacs/manual/html_node/emacs/Fill-Commands.htmlMoreover, font size could be reduced (indeed, for a tooltip, current size looks too big). Atom does this and the popups are really not much larger than vscode ones, but the layout of the text is superior.
Related issues
microsoft/vscode-python#5577, microsoft/vscode-python#5610, microsoft/vscode#14165,
microsoft/vscode#38663
Some of the referenced issues suggest that changes upstream could improve the situation for vscode-python, but anyway I believe there still is room for improvement and no popup width short of 80 characters will ever be right, anyway.
The text was updated successfully, but these errors were encountered: