'Invalid window id' when open and close signature are mapped to the same keybind
Closed this issue · 3 comments
With vim.keymap.set("n", "Y", "LspOverloadsSignature") and close_signature = "Y", if you open a signature window and navigate between parameters, then if you try to open a signature window again, you will get 'Invalid window id'. I can provide more details and investigate more if this does not reproduce.
the same problem.
Hi @leoshatrushin - Thanks for raising this issue.
I've been able to reproduce the issue. This is due to an omission I made in the documentation, so I've made it more clear now in the README.
Essentially, the mappings rely on the buffer number being passed in, so that the signature popup can be correctly identified by the plugin. Without this, the popup window isn't tracked correctly and ends up closing prematurely when cycling through parameters. Passing in the buffer
option when setting up the mappings, inside the on_attach
method of the LSP server options, will correct this issue.
I'll close the issue, but please do let me know if this doesn't fix your issue.