packer.nvim
packer.nvim copied to clipboard
packersync hangs
packersync hangs on windows. adlfter the process is completed, the prompt (windows terminal) would lag. anyways to fix this? my github repo
I see the same. Building nvim off master, and attempting the latest version of packer.
It's been hanging for me for quite a while, I was just about to open an issue but this is generally what I see after running packersync:

The number of packages syncing is different each time.
I've had luck setting max_jobs to something like 10.
I've had this issue for a while too. My personal computer runs Linux and I've never had any issues with Packer hanging on that machine. For work I use a macbook and it will always hang.
Today I deleted all plugins and tried installing them in batches on my macbook and running PackerSync did not hang up until around plugin 70. After that no order of plugin that I tried would work. Finally, setting a limit to max_jobs allowed all plugins to update without hanging.
same problem then. i have around 40 plugins. i m running windows. the packersync prompts hang, escaping neovim also hangs my whole comp hangs. jope packer can fix this
anyone still having this issue?
I fixed it by setting max_jobs as suggested above. Perhaps there should be a default value? Though it feels like a bandaid without knowing exactly what is going on. I would think lua should be able to schedule jobs such that it doesn’t hang.
conf for packer?
Yeah, here's the commit where I set it: https://github.com/knpwrs/dotfiles/commit/5d0f0ab1cb0dc654cebabe1b5ab0c3dd46731108?w=1
I also have the same problem. I'm on windows and have around 40+ plugins. The max_jobs doesn't seem to fix it for me. When i run PackerSync i can still move around in my project for some time before whole Nvim is freezing. After like 30 seconds the PackerSync window pops up.
i have same issue, and try with this solution, it work for me, setting on packer.init add max_jobs = 10
I have the same problem, and adding config = { max_jobs = 10 }} in my packer.init.lua could help me solve this problem
i hv switched to linux now. packersync is not lagging or stopping anymore. so i think its windows issue
I'm still running into the same issue on MacOS if I don't have max_jobs set to 10. Are we closing the issue because there is a workaround?
For reference how to add max_jobs = 10:
put max_jobs = 10 in packer.init({ ... }) .
plugins.lua
-- auto install packer if not installed
local ensure_packer = function()
local fn = vim.fn
local install_path = fn.stdpath("data") .. "/site/pack/packer/start/packer.nvim"
if fn.empty(fn.glob(install_path)) > 0 then
fn.system({ "git", "clone", "--depth", "1", "https://github.com/wbthomason/packer.nvim", install_path })
vim.cmd([[packadd packer.nvim]])
return true
end
return false
end
local packer_bootstrap = ensure_packer() -- true if packer was just installed
-- autocommand that reloads neovim and installs/updates/removes plugins
-- when file is saved
vim.cmd([[
augroup packer_user_config
autocmd!
autocmd BufWritePost plugins.lua source <afile> | PackerSync
augroup end
]])
local status, packer = pcall(require, "packer")
if not status then
return
end
packer.init({
package_root = fn.stdpath("data") .. "/site/pack",
compile_path = fn.stdpath("config") .. "plugin/packer_compiled.lua",
plugin_package = "packer",
display = { open_fn = require("packer.util").float },
max_jobs = 10,
})
-- add list of plugins to install
return packer.startup(function(use)
use("wbthomason/packer.nvim")
...
...
if packer_bootstrap then
packer.sync()
end
end)
EDIT: So this helped me instead: ulimit -n 4096 just run it in terminal and open neovim for sync (or make it permanent in shell rc)
this happened to me today, i dont really understand how to fix this ...i would expect this helps but it does not
return require('packer').startup(function(use)
-- packer {{{
use {'wbthomason/packer.nvim', config = function()
require('packer').init{ max_jobs = 10 }
end}
then if i run it manually i probably need to extend defaults because this way it wants to delete all my plugins.
What I want to ask the most is "why is this closed when this still happens?". Can we reopen this issue? Because everyone with more than 70 plugins will have to bypass this