Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat: add PackerSnapshotDone autocmd #898

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

younger-1
Copy link
Contributor

Description

Add a new PackerSnapshotDone autocmd which will be fired after PackerSnapshot command.
Why? As #370 (comment) said, the snapshot file generated is not ordered or stable and is not ideal for checking into source control and easily seeing what changed. Before packer could expand and sort the generated snapshot file, this is needed for more smooth experience of packer's snapshoot feature.

usage example:

autocmd User PackerSnapshotDone lua require('utils').sort_snapshot_file()

Test

I have test the commits of the pull request in Archlinux-WSL and Windows 10 and in both environments the autocmd works well.

see usecase here https://github.com/younger-1/nvim/blob/d0ce631b41644e841a25bc7eac0b053a288ce0fe/lua/young/plugin-loader.lua#L131-L132

@younger-1
Copy link
Contributor Author

@wbthomason Do you have any feedback for this feat? Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant