-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How can i install plugins in a synchronous way. #170
Comments
Can you provide the error that it gives you and the config where you call paq? |
|
Currently the best way to get this behavior in paq is using the setup option I took the liberty to refactor your local function bootstrap_paq(packages)
local path = vim.fn.stdpath("data") .. "/site/pack/paqs/start/paq-nvim"
if not vim.uv.fs_stat(path) then
local url = "https://github.com/savq/paq-nvim.git"
vim.fn.system({ "git", "clone", "--depth=1", url, path })
vim.cmd.packadd("paq-nvim")
vim.notify("Installing plugins")
end
local paq = require("paq"):setup({ opt = true })(packages)
local to_install = paq.query("to_install")
if not vim.tbl_isempty(to_install) then
paq.install()
end
for _, p in pairs(packages) do
if type(p) == "table" then
p = p[1]
end
p = {vim.fs.basename(p)}
vim.cmd.packadd({ args = p, bang = true })
end
end This should solve the problem. |
The problem here is not that paq downloads packages asynchronously but rather that vim packages doesn't cope well with loading at runtime things from the start directory. Even if you force it with rtp. So for this reason the most manageble solution is to use the opt directory by default and then load the packages in bulk. |
Yup! thank you for helping me out |
Hello and first of all thank you for this amazing neovim plugin manager. I wanted to know if there is any method like installSync or similar functionality of sort since everytime i add a new plugin, I end up with an error and my config wont load. Is there any way to prevent this from happening.
The text was updated successfully, but these errors were encountered: