paq-nvim icon indicating copy to clipboard operation
paq-nvim copied to clipboard

Installing all packages on a new system

Open kovasap opened this issue 4 years ago • 2 comments

I was just setting up a new system and installing packages with paq. One thing I noticed was that in order to install everything I would have to repeatedly run PaqInstall, quit nvim, run nvim, then run PaqInstall again to install a few more plugins. I think this might have to do with the fact that some parts of my init.lua cannot be executed without certain plugins installed. Also sometimes it just seems like Paq hangs after installing a package (maybe it's doing something but I have no way of knowing).

Has anyone else had this problem and/or know some good workarounds?

kovasap avatar Dec 06 '21 20:12 kovasap

The deeper problem here is that placing the code that manifests a system, i.e. paq downloading plugins, along side other code that expects the system to exist already is complicated.

Calling paq before any require would ensure packages are registered before any error is raised, meaning :PaqInstall will install everything. After the install, reloading your config should be enough to have everything working again (:source $MYVIMRC).

I hope adding autocommands in the next release (#87) will make it easy to write a separate script that can install stuff in headless mode.

Also sometimes it just seems like Paq hangs after installing a package (maybe it's doing something but I have no way of knowing).

Yeah, I also added a message to indicate when a command finished. If paq does block nvim that might require a separate issue.

savq avatar Dec 07 '21 03:12 savq

FYI this issue was fixed for me by the new require "paq" {<list of packages} syntax that was added in the 1.0 release (https://github.com/savq/paq-nvim#usage)!

Now I'm just a bit annoyed that I can't paq 'package-name' a package in a single line of code then configure it in subsequent lines. Instead I have a large list of packages at the start of my config and then all their configuration below.

kovasap avatar Jan 05 '22 23:01 kovasap