rcarriga / nvim-notify

A fancy, configurable, notification manager for NeoVim
MIT License
3.03k stars 81 forks source link

feat: Add ability to clear notification history #248

Open nullromo opened 8 months ago

nullromo commented 8 months ago

Summary

Adds the :NotificationsClear user command and the require("notify").clear_history() lua function to clear notification history.

Details

The implementation simply resets the internal notification history table to an empty table. I am not sure how this interacts with any potential asynchronous activity, but I figured that if something is waiting to be pushed into the history table, it doesn't really matter for practical purposes if it gets pushed before or after the table is reset.

I added a documentation header in the code and I updated the readme to reflect the new command and new function.

Notes

Closes #158

invertedEcho commented 5 months ago

What about this pull request? I would find this feature pretty useful.

nullromo commented 3 months ago

I don't know what I did, oops. Did not mean to close the PR.