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

Open
stefanwatt opened this issue Oct 8, 2024 · 2 comments
Open

Windows overlapping -> Cannot see signature help #45

stefanwatt opened this issue Oct 8, 2024 · 2 comments

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants