Our great sponsors
-
packer.nvim
A use-package inspired plugin manager for Neovim. Uses native packages, supports Luarocks dependencies, written in Lua, allows for expressive config
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
I'm using packer.nvim as my plugin manager and I have the bootstrapping function the show on the repo. The problem that I'm facing is that if a put my nvim config files in a new machine, I can see nvim downloading packer just fine but then if I try to install the plugins with something like nvim --headless +PackerInstall +qall (or just opening nvim and running :PackerInstall) it gives errors because my config is calling functions and a colorscheme that doesn't exist yet since those plugins aren't installed. And I wasn't even able to edit my init.lua to stop requiring all the files with the plugins because it wouldn't even let me save a file, I literally had to go and install a different text editor, then edit my init.lua, save it and finally I was able to run :PackerInstall. I don't want to go through all of that every time I put my configs in a new machine.
When I was using vim-plug as my plugin manager I was able to run nvim --headless +PlugInstall +qall in a script I had to install my configs in a new machine. It didn't matter if my config was calling plugins or a colorscheme that didn't exist, that wasn't a problem. It just installed everything without issues.
I created a wrapper around packer commands that uses vim.wait. I can either call this sync command on the command line nvim +PackerInstallSync +qa or during initialization check if packer.nvim folder is in the packpath and it not then clone packer and call the sync version of install. Sync wrapper and Packer bootstrapping
Hi, I have been facing the same problem after migration. Here is how i solved it: https://github.com/krnik/doot/blob/master/nvim/init.lua