wbthomason / packer.nvim

A use-package inspired plugin manager for Neovim. Uses native packages, supports Luarocks dependencies, written in Lua, allows for expressive config
MIT License
7.72k stars 263 forks source link

README: add Lua example code for auto-running PackerCompile #1221

Open erikw opened 1 year ago

erikw commented 1 year ago

Many users come to Packer because they can then migrate to a complete Lua-based config for NeoVim.

Thus it makes sense to have a code example not only in Vimscript for auto-running PackerCompile on changes to plugins.lua but also an example in Lua.

Reference: https://neovim.io/doc/user/lua-guide.html#lua-guide-autocommands-group