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

feature: Update popup positon on outer window scroll

Open phgz opened this issue 5 months ago • 0 comments

Did you check the docs?

  • [X] I have read all the noice.nvim docs

Is your feature request related to a problem? Please describe.

When scrolling outer window (not the popup), the popup does not follow the cursor.

Screenshot 2024-01-24 at 11 40 49

Describe the solution you'd like

Update the popup position when the outer window is scrolled.

Describe alternatives you've considered

At the moment I create a WinScrolled autocmd with, for example:

if vim.bo[api.nvim_win_get_buf(win)].filetype == "noice" then
  api.nvim_set_current_win(win)
  vim.defer_fn(function()
    vim.cmd.close()
    vim.lsp.buf.hover()
  end, 0)
end

It works, but there is a flickering of the popup.

I also tried to update the window config with vim.api.nvim_win_set_config, but it is not a regular window, so it does not work.

Screenshot 2024-01-24 at 14 06 56

Additional context

No response

phgz avatar Jan 24 '24 16:01 phgz