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

feature: Ability to _flush_ the history.

Open pysan3 opened this issue 4 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 I :Noice (aka :NoiceHistory, aka :Noice history), with a log that is VERY long, UI gets stuck for a while.

It would be nice if there was something in the line of :Noice flush that clears the hisotry. So that when I :Noice the next time, I will have a clean sheet and have no UI stuttering.

Describe the solution you'd like

This is the code to flush the history with the current API, which is kinda workaround?

:lua require("noice.message.manager")._history = {}

I'd love to see a good access to this feature with a command interface, as it would be easier to run.

Describe alternatives you've considered

At least I'd like to have a proper method support inside manager.lua.

M.flush = function()
  M._history = {}
  -- Maybe also run
  -- M.prune(0)
end

Additional context

No response

pysan3 avatar Feb 16 '24 21:02 pysan3