Closed jackMort closed 1 year ago
This is expected. Nui components do not react to resize events automatically.
You can try something like this:
vim.api.nvim_create_autocmd("WinResized", {
group = vim.api.nvim_create_augroup("refresh_popup_layout", { clear = true }),
callback = function()
popup:update_layout()
end,
})
popup:update_layout()
resizes and repositions the popup (using current config). You can even pass a config
table if you want to change the current config.
Note: WinResized
event is not available in older Neovim.
Great, thank you!
screencast-bpconcjcammlapcogcnnelfmaeghhagj-2023.01.20-10_47_37.webm
as on preview video. here's the popup definition: