Mercurial > dotfiles
diff .chezmoitemplates/init.lua @ 688:6e98364a5a28
chore: convert chezmoi autocmds to lua
author | zegervdv <zegervdv@me.com> |
---|---|
date | Wed, 05 Oct 2022 08:56:58 +0200 |
parents | a56cc75911b0 |
children | 424764c7f51a |
line wrap: on
line diff
--- a/.chezmoitemplates/init.lua Sun Oct 02 18:43:18 2022 +0200 +++ b/.chezmoitemplates/init.lua Wed Oct 05 08:56:58 2022 +0200 @@ -1007,6 +1007,16 @@ }, }) +-- Apply changes in chezmoi managed files +au.group('chezmoi', { + { 'BufWritePost', os.getenv 'HOME' .. '/.local/share/chezmoi/*', 'silent !chezmoi apply --source-path %' }, + { + 'BufWritePost', + os.getenv 'HOME' .. '/.local/share/chezmoi/.chezmoitemplates/init.lua', + 'silent !chezmoi apply --source-path $HOME/.local/share/chezmoi/dot_config/nvim/init.lua.tmpl', + }, +}) + -- Snippets local ls = require 'luasnip' -- Expand snippet or jump to next placeholder