Open minrk opened 1 month ago
there shouldn't be two tooltips at once
I think this should be configurable; I get why this can be annoying. Some other popular editors show even more tooltips as you type.
tooltips shouldn't ever obscure the cursor
agreed! I think this is a regression due to a change in positioning of the tooltip. I guess this happens when at the top of the notebook, but not when you have more space overheads, right?
The relevant plugin is called "signature", as a quick fix you can disable it in the settings.
Thanks! I found the disable as I was writing up the issue. Took me a while, since it doesn't show up in search results for LSP or Language Server.
It appears to always obscure something, but you're right, it does depend on where the cursor is in the frame. In the middle, it almost doesn't obscure it at all (it does overlap the top of the cursor's row a tiny bit):
And at the bottom, it doesn't obscure the code (any more than the middle one, at least), but does completely obscure the completions:
though this is inconsistent, as scrolling up and down results in the tooltips obscuring the cursor no matter where it is:
When placing a tooltip above the cursor, it should probably be offset by at least the width of the tooltip's drop shadow plus a bit.
I get that some folks like to see lots of information so everyone's preferences will differ. But it doesn't seem right that showing two overlapping tooltips will ever be the right thing to do, but if that's going to happen, how on earth does one pick? I saw some screenshots when I was checking if this was already open (that I can't find anymore, of course) where the completion and signature appeared to share a tooltip. That seems like it might help with the layout problem, but I assume there's a good reason it doesn't work that way anymore.
completion and signature appeared to share a tooltip
I think you may think about documentation in the completer. You can enable it in settings.
But it doesn't seem right that showing two overlapping tooltips will ever be the right thing to do, but if that's going to happen, how on earth does one pick?
Right!
As to which to show - the language server decides whether to show signature or not - not this extension, so the behaviour will differ between servers. Which server are you using?
Description
when opening parentheses triggers the signature, the default behavior of lsp appears to be to show an extra tooltip (in addition to default completer), which obscures the code being typed and the completions.
As a result, I have to be constantly hitting escape, every time I open parentheses or type any number of other completion or inspection-triggering keys.
It's unclear to me if this is an lsp problem or a jupyterlab problem, but both of these behaviors seem incorrect:
Reproduce
https://github.com/user-attachments/assets/ec59a21a-5670-4eaf-bcf7-06c2f550e0be
Expected behavior
Context
Required: installed server extensions
Required: installed lab extensions