git-worktree.nvim
git-worktree.nvim copied to clipboard
Add additional "pre" hooks
I'm using the hooks to handle docker-composing up / down containers as I create or switch between worktrees. The only issue I have is that there's no pre-delete hook that would allow me to run docker-compose down. I imagine this would be useful for other things as well to clean up resources when a worktree is removed.
My proposal would be to add an additional Deleting hook that receives the path of the to be deleted worktree.
i also feel the need for this pre hooks. i'm using tpope's obsession plugin and don't want it to track when switching worktree. i've tinker a bit and gonna make pr. please give feedback, thanks.