Closed bassamsdata closed 4 months ago
Thanks for the suggestion!
My previous answer to this was for user to override the open()
and close()
functions to perform actions they need. But this use case is both denies this advice and is quite useful.
I myself was thinking recently about Git status icons and it seems to be a relatively concise and performant way to do so. And it indeed needs those events. So I think I'll consider adding that to 'mini.extra' in the recent-ish future, while resolving this issue hopefully sooner.
thank you, appreciated!
This should now be resolved on latest main
with MiniFilesExplorerOpen
and MiniFilesExplorerClose
events.
Would you mind following up on whether they work for your git status caching use case? Thanks.
Would you mind following up on whether they work for your git status caching use case?
Thanks for adding these events. Autocommands that trigger open (git status) and close(clear cache) are working wonderfully (you can check out my integration here).
Currently, everything's smooth, and I've also got a mapping that uses vim.cmd("@")
, which now functions perfectly without triggering multiple requests for git status.
Thank you!
Contributing guidelines
Module(s)
mini.files
Description
Hello, Would it be possible to include an event trigger for when minifiles.open() is called, and another for when minifiles.close() happens? Currently, many events trigger multiple times throughout a minifiles session, which works well for actions within minifiles windows/buffers. However, it's not ideal for triggering actions solely on minifiles open or close.
Here's why I'm suggesting this: I've implemented git integration with caching and need to clear the cache efficiently when the minifiles session ends. Without these specific events, it's almost impossible to achieve this efficiently. something like this:
I understand the value of your time, and I don't want to take up too much of it. It seems like a straightforward addition, considering there's already a mechanism for generating triggers in the source code.
Thanks for considering this!