summary refs log tree commit diff
path: root/.vim/lua/plugins.lua
diff options
context:
space:
mode:
authorRobert Günzler <r@gnzler.io>2022-02-08 23:48:12 +0100
committerRobert Günzler <r@gnzler.io>2022-02-08 23:48:12 +0100
commit2ecdf368b4a215dc23cb126051863d8279f3205e (patch)
treee1dcd1f43a26b9c29eb7265a1a47830bb7a381fe /.vim/lua/plugins.lua
parent465a93e204adbeccae6cb33fe05edf9636f7054e (diff)
vim: auto-compile after editing plugins.lua
Diffstat (limited to '')
-rw-r--r--.vim/lua/plugins.lua4
1 files changed, 4 insertions, 0 deletions
diff --git a/.vim/lua/plugins.lua b/.vim/lua/plugins.lua
index 65b573f..4bb7924 100644
--- a/.vim/lua/plugins.lua
+++ b/.vim/lua/plugins.lua
@@ -41,6 +41,10 @@ end -- }}}
 
 -- we change the packer.compile_path below, so we need to require it here...
 require('packer_compiled')
+-- auto-compile on save
+augroup {
+  autocompile = {{ 'BufWritePost', 'plugins.lua', [[ exe 'luafile %:p' | PackerCompile ]] }}
+}
 
 return require('packer').startup({function()
   -- disable built-in plugins