diff --git a/README.md b/README.md index f0fba202..c5dd9c24 100644 --- a/README.md +++ b/README.md @@ -219,6 +219,17 @@ vim.cmd([[ ]]) ``` +Since neovim 0.7.0 you can do this in lua too + +```lua +vim.api.nvim_create_augroup('packer_user_config', { clear = true }) +vim.api.nvim_create_autocmd('BufWritePost', { + group = 'packer_user_config', + pattern = 'plugins.lua', + command = 'source | PackerCompile' +}) +``` + ## Bootstrapping If you want to automatically install and set up `packer.nvim` on any machine you clone your configuration to,