-
Notifications
You must be signed in to change notification settings - Fork 293
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bug: dependencies
of disabled plugins break optional
calculation
#1402
Comments
optional
breaks ignored dependencies
dependencies
of disabled plugins break optional
calculation
Also I noticed the |
I cant get optional decency working at all. I get errors that the plugin is not found. When I use this config: require("lazy").setup({
{
"projekt0n/github-nvim-theme",
priority = 1000,
config = function()
require("github-theme").setup({ options = { transparent = true } })
vim.cmd.colorscheme("github_dark_dimmed")
end,
dependencies = {
{ "echasnovski/mini.nvim", optional = true, lazy= true }, -- should not load
},
},
}) I get this error when i open vim: Error detected while processing /home/blue/.config/nvim/init.lua:
Plugin mini.nvim not found |
@bluebrown I am also getting this behavior. It seems like the feature added in #947 has been broken along the way @abeldekat any idea what has happened? |
@mehalter, I have no idea. My last contribution was in october 2023. |
Did you check docs and existing issues?
Neovim version (nvim -v)
NVIM v0.9.5
Operating system/version
Arch Linux
Describe the bug
Given a plugin with some list of dependencies, if the plugin is disabled all of the dependencies should also be disabled if they aren't specified anywhere else.
Similarly if I have a plugin with the
optional = true
key set it should also be ignored unless the plugin is specified explicitly somewhere.If I have a plugin defined as
optional
and also defined as a dependency to a plugin that is disabled the plugin should not be enabled.My guess is the calculation of
optional
is happening before filtering out plugin specs for disabled plugins which breaks the behavior ofoptional
.Steps To Reproduce
nvim -u repro.lua
, run the minimal config below:Lazy
, open lazy and see thatnvim-cmp
is not disabledExpected Behavior
Plugins listed as dependencies of disabled plugins shouldn't trigger
optional
plugin specs to be enabled. Since at the time of calculation it is not valid.Repro
The text was updated successfully, but these errors were encountered: