"Too many rounds of missing plugins" error #1910
-
Hey friends 👋 , I upgraded from Lazy.nvim 9.x to 11.x recently. Everything was working great on 9.x. For the LIFE of me I cannot figure out what I'm configuring wrong for v11 to work. I cannot get a single one of my local plugins to load properly and work. I've now spent hours on this. Any help would be MUCH appreciated 🙏 . Related to this bug, but none of the solutions offered in the thread seemed to work: nvim version:
Checkhealth:
I've tried setting up a single local plugin in various ways, to no avail. I have all my local plugins in a symlinked folder: And then it fails to install Path a
-- content of ~/.dotfiles/nvim/lua/plugins.lua
return {
{
dir = "~/.dotfiles/nvim/lua/colorscheme.lua",
name = "colorscheme",
lazy = false,
priority = 1000,
-- init = function()
-- require("colorscheme").init()
-- end,
},
} -- ~/.dotfiles/nvim/lua/colorscheme.lua
return {
name = "colorscheme",
dependencies = {
-- LIGHT themes I like
"cocopon/iceberg.vim", -- "++ (Blue + purple)
"EdenEast/nightfox.nvim", -- ++ Dark during the day. Has 10 themes inside. Very configurable.
"stillwwater/vim-nebula", -- ++ NICE in light AND Dark (nightshift decent)
-- DARK themes I like (fox ones)
-- "ghifarit53/tokyonight-vim", --NICE. try it out more similar to night owl
"folke/tokyonight.nvim", --tokyonight-storm (decent) -moon
},
init = function()
print('colorscheme:setup')
vim.opt.background = "light"
vim.api.nvim_create_user_command("Light", ':lua vim.opt.background="light"', { nargs = 0 })
vim.api.nvim_create_user_command("Dark", ':lua vim.opt.background="dark"', { nargs = 0 })
-- vim.cmd('colorscheme iceberg') -- no lua equivalent of this :colorscheme command
-- vim.cmd('colorscheme dayfox') -- no lua equivalent of this :colorscheme command
-- vim.cmd('colorscheme duskfox') -- no lua equivalent of this :colorscheme command
-- vim.cmd("colorscheme dawnfox") -- no lua equivalent of this :colorscheme command
-- current default
vim.opt.background = "dark"
-- require'EdenEast/nordfox.nvim'
-- vim.cmd("colorscheme nordfox") -- no lua equivalent of this :colorscheme command
end,
}
Path bPretty much the same as A, but instead I build the spec manually: -- table
local pluginTree = {}
-- build a table of plugin specs that are returned from the local plugin files
-- Makes it easy to load local plugins using an array
function buildPluginList(list)
for _, localPlugin in ipairs(list) do
-- local pluginSpec = require(localPlugin)
local pluginSpec = {}
-- spec needs to follow this format:
-- https://lazy.folke.io/spec
pluginSpec.dir = "~/.dotfiles/nvim/lua/" .. localPlugin .. ".lua"
pluginSpec.name = localPlugin
-- pluginSpec.import = pluginSpec.dir .. "/" .. localPlugin .. ".lua"
-- pluginSpec.import = localPlugin
-- pluginSpec.name = localPlugin .. ".lua"
-- pluginSpec.lazy = false
-- pluginSpec.dev = true -- use local plugin folder
table.insert(pluginTree, pluginSpec)
end
-- print('pluginSpec', vim.inspect(pluginTree))
end
-- BUG: it's only executing the very last item in the list...
buildPluginList({
'colorscheme',
-- 'cursorline'
})
require("lazy").setup(pluginTree) ^ This worked great until v11.x |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 7 replies
-
This is not a dir? |
Beta Was this translation helpful? Give feedback.
-
Ok. After reading through the docs carefully again, and looking at the examples again it finally clicked... I was incorrectly treating After making the adjustments needed, both these approaches worked beautifully: Option a:
|
Beta Was this translation helpful? Give feedback.
Ok. After reading through the docs carefully again, and looking at the examples again it finally clicked...
I was incorrectly treating
colorscheme.lua
etc as plugin. Really those are just a spec file that needs to get merged with the other spec files.After making the adjustments needed, both these approaches worked beautifully:
Option a:
plugin.lua
file