Switched to Neovim's native 'vim.pack' package manager
Switching from lazy.vim to vim.pack was pretty easy.
Overview
I’ve been using lazy.nvim as my package manager for Neovim practically forever, but I decided that I wanted a fresh start with my Neovim configuration. My goal was to slim it down and leave it in a much more manageable state. There are a lot of things that are either native in Neovim 0.12+ now or simply weren’t used enough to warrant being kept around.
A super quick introduction to vim.pack.
vim.pack stores your plugins within ~/.local/share/nvim/site/pack/core/opt/
and its lockfile, located at ~/.config/nvim/nvim-pack-lock.json, tracks revisions
just like lazy.vim’s lockfile does.
It has a simple API call comprising of vim.pack.add(), vim.pack.del(),
vim.pack.update(), and vim.pack.get().
A configuration can look something like is:
1
2
3
4
5
6
7
8
9
vim.pack.add({
{
src = "https://github.com/saghen/blink.cmp",
version = vim.version.range("1.*"),
},
"https://github.com/nvim-tree/nvim-tree.lua",
"https://github.com/nvim-tree/nvim-web-devicons",
})
The vim.pack’s entry within the Neovim Pack documentation will show you a lot of additional options that you can use.
Thoughts
Having native options are always great to have, but for some people with much larger plugin libraries I would say that lazy.vim will potentially still be the better choice for them.
My new Neovim configuration only has about thirteen plugins in it that for the most part do not require additional customization as the default settings are just fine. vim.pack gives me everything that I really needed in its current state.
If you are interested in checking out my updated init.lua file, you can view
it here.