DetachHead / basedpyright

pyright fork with various type checking improvements, improved vscode support and pylance features built into the language server
https://docs.basedpyright.com
Other
1.09k stars 20 forks source link

Continue docstring popup on new line instead of cutting off #796

Open Altonss opened 6 days ago

Altonss commented 6 days ago

Test example, start writing (where | is the cursor):

import gc

gc.col|

The docstring of gc.collect is displaying, but on my machine the return type (and also the parameters) can be cut off if the size of the docstring popup is too small. I have to manually extend the popup size to see everything.

Expected: If the size of the popup is too small, it should just gracefully continue on a new line :)

BasedPyright v 1.19.0 (VSCodium)

DetachHead commented 6 days ago

could you post a screenshot of what you're seeing? for me, i don't see the docstring appear until i finish typing "collect":

image

then when i do, the docstring renders correctly:

image

Altonss commented 6 days ago

Without changing the popup size, line cut off: Capture d’écran du 2024-10-20 12-07-15 When increasing the popup size: Capture d’écran du 2024-10-20 12-07-26

I see the popup appear even when I haven't finished typing "collect", and to be honest it is pretty nice feature. It is not the default: I clicked on the little arrow to "show more" about "collect" suggestion, for it to become the default :)

DetachHead commented 5 days ago

ah i see now. with typescript it correctly wraps to a newline:

image

i wonder if this is something that's configurable in the language server or the vscode extension

Altonss commented 5 days ago

ah i see now. with typescript it correctly wraps to a newline:

I Python it sometimes also wraps correctly to a newline, but not always ^^