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

Signature help is too high above cursor #234

Open
LostNeophyte opened this issue Nov 22, 2022 · 15 comments
Open

Signature help is too high above cursor #234

LostNeophyte opened this issue Nov 22, 2022 · 15 comments

Comments

@LostNeophyte
Copy link

image
There are two empty lines between the current line and the window. It only happens in the first half of the screen

minimal config:
https://github.com/ray-x/lsp_signature.nvim/blob/master/tests/init_pack.lua with sumneko_lua instead of tsserver

@ray-x
Copy link
Owner

ray-x commented Nov 22, 2022

image
Strange, I did not see it in the default config.
Are you using a GUI neovim frontend ?

@LostNeophyte
Copy link
Author

Just the terminal, it's weird I think it started after installing noice, but I uninstalled it and it's still happening, even in toolbox(podman)

@ray-x
Copy link
Owner

ray-x commented Nov 23, 2022

did you still have noice turn on in lspsignature setup? It will add empty lines to signature

@LostNeophyte
Copy link
Author

LostNeophyte commented Nov 23, 2022

I completely uninstalled noice, and it was even happening with the clean config. In a couple hours I'll check it on a different machine where noice was never installed just to be sure

@ray-x
Copy link
Owner

ray-x commented Nov 23, 2022

what is your lua lsp server version and your neovim version?

@LostNeophyte
Copy link
Author

LostNeophyte commented Nov 23, 2022 via email

@LostNeophyte
Copy link
Author

Same thing is happening on the different machine, with sumneko 2.something

@ray-x
Copy link
Owner

ray-x commented Nov 23, 2022

I can see it with default config and latest neovim. Seems the border height calculation is incorrect with that combination.

@ray-x
Copy link
Owner

ray-x commented Nov 23, 2022

I pushed a fix. Seems to work fine for me. Could you check?

@opalmay
Copy link

opalmay commented Nov 24, 2022

Hi! Thank you for the fix.
The issue is mostly solved, but not for the first time it shows when using toggle_key

@LostNeophyte
Copy link
Author

It still happens for me

@LostNeophyte
Copy link
Author

doesn't work with require:
image

but works with print:
image

@LostNeophyte
Copy link
Author

LostNeophyte commented Nov 24, 2022

:lua =vim.lsp.util._make_floating_popup_size({ "```lua", "hi", "```", "2nd line" },{} returns 8, 4
so it looks like it counts ``` lines even though they aren't displayed

so if you add the border to the returned height, it's actually too much, I'm not sure if that isn't a bug on nvim's side in that case

@ray-x
Copy link
Owner

ray-x commented Nov 24, 2022

I noticed require has some empty lines in its signature doc. It can be the size calculation is not correct somewhere. In your example, it might be correct if the borders are included.

@LostNeophyte
Copy link
Author

LostNeophyte commented Dec 6, 2022

this fixes the issue, I hope it helps, I think it also solves #242 and #224, It may not work with signature that doesn't have code blocks though, I don't know which lsp server to use to test that

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

3 participants