-
Notifications
You must be signed in to change notification settings - Fork 501
Description
Did you check docs and existing issues?
- I have read all the lazy.nvim docs
- I have updated the plugin to the latest version before submitting this issue
- I have searched the existing issues of lazy.nvim
- I have searched the existing issues of plugins related to this issue
Neovim version (nvim -v)
v0.11.4
Operating system/version
macOS 15.6.1
Describe the bug
Installing a plugin with git v2.51.0 clones the plugin's repository with the new reftable refs format.
See [ANNOUNCE] Git v2.51.0 for more details.
lazy.nvim installs the plugin, but fails to fetch the logs of the plugin, and more importantly, generates an invalid lockfile (lazy-lock.json) containing only an opening brace ({)
The below error is shown after :Lazy syncing the first time:
~/.local/share/nvim/lazy/lazy.nvim/lua/lazy/manage/lock.lua:29: commit is nil
lazy.nvim/lua/lazy/manage/lock.lua
Line 29 in 6c3bda4
| commit = assert(info.commit, "commit is nil"), |
The below error is shown after closing and reopening :Lazy:
~/.local/share/nvim/lazy/lazy.nvim/lua/lazy/manage/task/git.lua:90: branch '.invalid' not found
lazy.nvim/lua/lazy/manage/task/git.lua
Line 90 in 6c3bda4
| error(k .. " '" .. v .. "' not found") |
Workaround
Manually switch the refs format of the cloned plugin from reftable to the files format.
- Navigate to the directory where the plugin is cloned.
- Run
git fetch
git refs migrate --ref-format=filesSteps To Reproduce
- Update
gittov2.51.0or greater - Add a new plugin to the config
- Sync the config (
:Lazy sync)
Expected Behavior
lazy.nvim installs the plugin, is able to fetch the logs of the plugin, and generates a valid lockfile (lazy-lock.json).
Repro
vim.env.LAZY_STDPATH = ".repro"
load(vim.fn.system("curl -s https://raw.githubusercontent.com/folke/lazy.nvim/main/bootstrap.lua"))()
require("lazy.minit").repro({
spec = {
{
"Shatur/neovim-ayu",
opts = {},
config = function(_, opts)
local ayu = require("ayu")
ayu.setup(opts)
ayu.colorscheme()
end,
},
},
})