Open rensftw opened 2 years ago
It feels like we are hitting process/file limit of your system . When new buffers are created we launch a git process to get diff status of associated file. Not sure how to fix it. For now if you have any other plugin that provides git diff like gitsigns you can use source
option
as shown here, so lualine uses information for there directly
@shadmansaleh Thank you! I do also have gitsigns.nvim and using it as the diff source for lualine fixes my issue. π
Keeping the issue open for now because it would persist for users without an alternative git diff source.
Oops, I accidentally closed it π
hitting the same problem. it essentially prevents me from dong anything 'interesting' on many buffers at once.
don't even have to open tabs. it fails with something as simple as bufdo e
. all it does is re-reads files from disk, one after the other. it fails after about 30-40 files.
now.. that limit does indeed seem a bit low, and I'm sure it can be increased somewhere.
but we are ignoring the elephant in the room. why lualine even tries to do anything for buffers that are not attached to the current window? that's a big waste of resources in my opinion. maybe switch from BufEnter
to BufWinEnter
?
actually tried changing to BufWinEnter
, and it didn't help. not sure why ;) looks like bufdo
does attach the buffers to the window just without actually showing it in the ui. may be ui is suspended during mass edit operations. I wander if lualine should also stop updating in those cases. it really makes no sense to update git info about tons of buffers that are not shown ...
Maybe this may help you guys
https://gist.github.com/tombigel/d503800a282fcadbee14b537735d202c
cdo s/foo/bar
This error happened.
for me it was the branchname on display in the lualine, so I added an external source:
My previous comment didn't seem to fix it.... whenever I am saving a file after working for a while, I am getting the following:
Error detected while processing BufWritePost Autocommands for "*":
E5108: Error executing lua Vim:E903: Process failed to start: too many open files: "/usr/bin/git"
stack traceback:
[C]: in function 'jobstart'
...l/share/nvim/lazy/lualine.nvim/lua/lualine/utils/job.lua:9: in function 'start'
...zy/lualine.nvim/lua/lualine/components/diff/git_diff.lua:133: in function 'update_git_diff'
[string ":lua"]:1: in main chunk
Press ENTER or type command to continue
Now I am trying to use ulimit -n 10240
per https://github.com/neovim/neovim/issues/14192
Versions
neovim
: v0.7.0lualine
: latestfugitive
: latestgit
: v2.36.1How to reproduce the problem
Method 1: Open many files (like 40 for example) in buffers and run
:bufdo tabnew
OR
Method 2: Checkout a git branch that has modified over 22 files and run
:Git difftool -y main
Either way will reproduce the issue.
Expected behaviour
All tabs are opened and no errors are thrown
Actual behaviour
Neovim is able to open only 22 tabs and the following error gets thrown:
Weirdly, 22 seems to be the hard cap for this issue. The only requirements to reproduce:
lualine
is setup and there are over 22 diffs.Minimal config to reproduce the issue
Config
Additional info
nvim -p $(fzf)
the issue does not happen.:bufdo tabnew
the error appears!Seem like this is a key part of the issue:
BufEnter Autocommands for "*"