A Guide to vim.pack (Neovim built-in plugin manager)

23 points by echasnovski


telemachus

Evgeni is a genuinely heroic contributor to Neovim and its larger environment, and I am very sure that vim.pack will make life easier for tons of people. I'm also sure that this post will help people use vim.pack better. Thanks for writing vim.pack and this.

That said, I have one personal observation, and I wonder if it rings true for anyone else. After years of different strategies for handling plugins in Vim and Neovim, I decided that I was happier to use a plugin manager that was not built into the editor. (I decided this before vim.pack existed, so it has nothing to do with how vim.pack is designed.) Here's my reasoning: when I open the editor, I want to edit text, I don't want to manage or update plugins then (or there). If, for example a plugin that I rely on a lot (say nvim-snippets) has just updated, then I would very likely need to restart the editor and maybe even update my configuration before restarting. I'd rather that be separate from normal editing sessions. What I ended up doing for a long time was writing a script to use Neovim in headless mode to invoke paq-nvim to update plugins. Eventually, I separated things even further and wrote a small Go program to read a config file and handle my plugins. As a bonus for me, it works equally well for Vim or Neovim because all it does is install, update, or delete Git repositories from specific places on disk. I use both, so I create multiple configs and invoke it as pluggo --config=<vim-config> or pluggo --config=<neovim-config>. (After I'd already written this, I discovered Joey Hess's myrepos, which does pretty much what I needed. Oh well.)

I could come up with a workflow where I use vim.pack (or paq-nvim or whatever) in a way that separates it from normal editing sessions, but in the end I prefer to more cleanly separate "dealing with a bunch of Git repos" from editing.