wbthomason / packer.nvim

A use-package inspired plugin manager for Neovim. Uses native packages, supports Luarocks dependencies, written in Lua, allows for expressive config
MIT License
7.83k stars 266 forks source link

Add a progress notification to PackerSnapshotRollback #942

Open LeonHeidelbach opened 2 years ago

LeonHeidelbach commented 2 years ago

I have integrated PackerSnapshots into our neovim IDE config NvChad as an extension to our NvChadSnapshot feature. After rolling back to a NvChadSnapshot I also rollback all of the user plugins using require('packer').rollback(<SNAPSHOT_NAME>). I have tried to await this function call using packers async and await functions but was unsuccessful in doing so. It would be nice to signal to the user that the rollback procedure is fully completed and having a way to wait for the asynchronous rollback to finish or have a way of showing the user how far along the rollback process is in a verbose way (i.e. "Rolling back plugin 20/100! - 20%"). If you could let me know how to properly run the rollback command synchronously I would implement it myself in our NvChadSnapshot feature, but I think having a progress indicator would be really helpful for all users since rolling back can take quite some time if a lot of plugins have to be processed and people might exit nvim before the rollback has been completed.

Thank you for your feedback!