lsp_signature.nvim icon indicating copy to clipboard operation
lsp_signature.nvim copied to clipboard

floating window generate BufLeave from editable buffer

Open qRoC opened this issue 2 years ago • 3 comments

When I enter in insert mode, this plugin generates a BufLeave from the edit buffer and a BufEnter for the floating window (floating window is not focused).

It breaks everything that is tied to BufLeave(autosave, autoformat, etc).

qRoC avatar Feb 24 '23 09:02 qRoC

@ray-x

qRoC avatar Mar 22 '23 14:03 qRoC

Ok, i traced.

signature_handler -> vim.lsp.util.open_floating_preview -> vim.api.nvim_open_win without noautocmd = true.

So need either implement custom preview window or keep the preview window open.

For now, you can use the undocumented setting cursorhold_update = false

qRoC avatar Mar 22 '23 19:03 qRoC

I added a workaround to this. In long term may need to file a PR for neovim.

ray-x avatar Mar 22 '23 22:03 ray-x