Skip to content

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