ray-x / lsp_signature.nvim

LSP signature hint as you type
Apache License 2.0
2.06k stars 57 forks source link

No trigger on first function argument when using double quotes (gopls) #217

Open nordicatlantic opened 2 years ago

nordicatlantic commented 2 years ago

Hi,

Thanks for this amazing plugin.

I have a pretty generic setup with nvim-cmp, lsp_signature has been installed and configured without any custom configuration. I just invoke it with require/setup and that's it.

For reference, I got Neovim latest nightly dev (0.8.0+), nvim-cmp, nvim-lspconfig and nvim-autopairs along with this plugin.

Please watch the video: the problem is shown in the second part of this video.

Also, there is a problem with popup flashing. When typing something in double quotes, the hinter flashes, it also flashes when just moving around in insert mode, as shown on the video.

https://user-images.githubusercontent.com/107055811/189869691-5de2af60-8d4f-4709-83a8-f4f6067cac5b.mov

ray-x commented 2 years ago

I did some tests, it seems to be a bug with gopls. As the signature does not return a valid signature until cursor moved to "addr"

nordicatlantic commented 2 years ago

Yeah, interesting. Seems to be working fine with e.g. sumneko_lua. But flickering popup window persists in both cases (when moving between chars in Insert mode).

ray-x commented 2 years ago

As for flickering. I feel it was caused by your setup. Do you have a minium init.lua I can reproduce?

nordicatlantic commented 2 years ago

Hi,

Sorry for the delay, I will reproduce something minimal a bit later (as currently my setup is pretty decoupled) or upload it to GitHub as well. Meanwhile, I noticed some patterns that might be helpful to debug this issue. The idea is that when you go to INSERT mode having a cursor positioned within some parameter, there's no flickering but also the floating window doesn't move above or below. On the other hand, if you happen to enter INSERT mode in some other place or temporarily leave the arguments section of a function, it can move in all four directions, except it starts to flicker.

https://user-images.githubusercontent.com/107055811/191003057-e8473a63-4bd4-4631-b0b9-7c3e5ffcce28.mov