[X] I have searched the existing issues of lazy.nvim
[X] I have searched the existing issues of plugins related to this issue
Neovim version (nvim -v)
v0.10.0 Release Build
Operating system/version
NixOS unstable
Describe the bug
Since version 11.0.0 lazy does no longer work with specs using the same underlying directory/repo. See the repro for an example. The issue was introduced with the major version 11, version 10 still worked in its final minor versioning.
Steps To Reproduce
run nvim -u repro.lua repro.lua as I provide it, and observe that only one of the mini.nvim modules is loaded in :Lazy
switch the comment from line 12 to line 13 to use the version 10
rm -r ./.repro
repeat step 1, it's working now
Expected Behavior
Both specs should load correctly, even if they're based on the same plugin directory.
Repro
-- DO NOT change the paths and don't remove the colorscheme
local root = vim.fn.fnamemodify("./.repro", ":p")
-- set stdpaths to use .repro
for _, name in ipairs({ "config", "data", "state", "cache" }) do
vim.env[("XDG_%s_HOME"):format(name:upper())] = root .. "/" .. name
end
-- bootstrap lazy
local lazypath = root .. "/plugins/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
-- vim.fn.system({ "git", "clone", "--filter=blob:none", "https://github.com/folke/lazy.nvim.git", lazypath })
vim.fn.system({ "git", "clone", "--branch=v11.0.0", "--filter=blob:none", "https://github.com/folke/lazy.nvim.git", lazypath })
-- vim.fn.system({ "git", "clone", "--branch=v10.24.3", "--filter=blob:none", "https://github.com/folke/lazy.nvim.git", lazypath })
end
vim.opt.runtimepath:prepend(lazypath)
-- install plugins
local plugins = {
"folke/tokyonight.nvim",
-- add any other plugins here
{
"echasnovski/mini.nvim",
main = "mini.statusline",
name = "mini.statusline",
opts = {},
},
{
"echasnovski/mini.nvim",
main = "mini.tabline",
name = "mini.tabline",
opts = {},
},
}
require("lazy").setup(plugins, {
root = root .. "/plugins",
})
vim.cmd.colorscheme("tokyonight")
-- add anything else here
Did you check docs and existing issues?
Neovim version (nvim -v)
v0.10.0 Release Build
Operating system/version
NixOS unstable
Describe the bug
Since version 11.0.0 lazy does no longer work with specs using the same underlying directory/repo. See the repro for an example. The issue was introduced with the major version 11, version 10 still worked in its final minor versioning.
Steps To Reproduce
nvim -u repro.lua repro.lua
as I provide it, and observe that only one of themini.nvim
modules is loaded in:Lazy
rm -r ./.repro
Expected Behavior
Both specs should load correctly, even if they're based on the same plugin directory.
Repro