-- Run `chezmoi apply` every time I use `chezmoi edit` -- https://www.chezmoi.io/user-guide/tools/editor/#use-chezmoi-with-vim vim.api.nvim_create_autocmd("BufWritePost", { pattern = vim.fn.expand("~") .. "/.local/share/chezmoi/*", command = 'silent ! chezmoi apply --exclude=scripts --source-path "%"', })