Skip to content
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

Windows overlapping -> Cannot see signature help #45

Closed
stefanwatt opened this issue Oct 8, 2024 · 8 comments · Fixed by #149
Closed

Windows overlapping -> Cannot see signature help #45

stefanwatt opened this issue Oct 8, 2024 · 8 comments · Fixed by #149
Labels
bug Something isn't working windows Module which displays UI

Comments

@stefanwatt
Copy link

image
I could probably make a PR for this if you want me to.
IMO then window layout should be calculated something like this:

  1. calculate max(autocomplete.height, documentation.height) -> they should start on the same row
  2. add height of signature help -> combined height
  3. calculate top of total layout based on cursor relative to viewport, in signature help windows bottom row should be one row above cursor row, the other two windows top row should be one row below cursor.

But....what happens if there's not enough room in the viewport to fit the autocompletion window below the cursor?
It would have to be placed above. If that's the case then the signature help window would be placed awkwardly far above (or not displayed?).

@Saghen
Copy link
Owner

Saghen commented Oct 8, 2024

calculate max(autocomplete.height, documentation.height) -> they should start on the same row

Totally agree

But....what happens if there's not enough room in the viewport to fit the autocompletion window below the cursor?
It would have to be placed above. If that's the case then the signature help window would be placed awkwardly far above (or not displayed?).

I was thinking it would make sense to put the signature help in place of the documentation, and have the documentation only show up on manual trigger. Wdyt?

@stefanwatt
Copy link
Author

stefanwatt commented Oct 8, 2024

I guess it's up to preference 🤷
I agree that displaying both signature help and autocompletion window is probably not gonna work.
So maybe add a field on blink.cmp.WindowConfig like displayWhenOverlapping.
Possible values signature-help and autocompletion. Default value signature-help
Always just showing signature help would be the easiest. If it's configurable like that, then there has to be some code to calculate autocompletion window position differently when it's a "drop-up".
Your call.

@patrick330602
Copy link

Also have the similar problem... but mine have the issue of also covering up the letter (there is a d under the signature help) Screenshot 2024-10-22 at 10 36 21

@idelice

This comment has been minimized.

@Saghen
Copy link
Owner

Saghen commented Oct 23, 2024

There are still cases where the autocomplete covers the signature help so I'll keep it open

@Saghen Saghen added bug Something isn't working windows Module which displays UI labels Oct 24, 2024
@Saghen Saghen closed this as completed in a67adaf Nov 1, 2024
@Saghen
Copy link
Owner

Saghen commented Nov 1, 2024

The signature help will now move to the opposite side of the completion menu and the documentation window will not overlap it. It can be a bit jarring when the completion menu switches sides but that's an issue for another day :)

image

@AlejandroSanchez90
Copy link

Hi, I'm new to Blink, and I'm having this issue, I'm using the default config

@calvinchoy
Copy link

Is there a configuration I need to set to prevent autocomplete overlapping the signature window?

When I autocomplete a function, the cursor moves inside the parentheses for inserting arguments. Without typing it shows the autocomplete menu while overlapping the signature float.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working windows Module which displays UI
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants