ray-x / lsp_signature.nvim

LSP signature hint as you type
Apache License 2.0
2.01k stars 56 forks source link

floating window generate BufLeave from editable buffer #260

Open qRoC opened 1 year ago

qRoC commented 1 year ago

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 commented 1 year ago

@ray-x

qRoC commented 1 year ago

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

ray-x commented 1 year ago

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