Skip to content
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: children specs are not properly ignored when disabling a plugin #1889

Open
4 tasks done
mehalter opened this issue Jan 14, 2025 · 0 comments
Open
4 tasks done

bug: children specs are not properly ignored when disabling a plugin #1889

mehalter opened this issue Jan 14, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@mehalter
Copy link

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)

NVIM v0.10.3

Operating system/version

Arch Linux

Describe the bug

When using the specs property in a Lazy plugin specification to add non dependency spec modifications it seems that they are always applied even when the parent plugin is disabled. These specifications should be ignored since the plugin that adds them is no longer enabled

Steps To Reproduce

  1. nvim -u repro.lua, start up the minimal configuration
  2. :Lazy, open lazy and see that plenary.nvim is disabled even though it shouldn't

Expected Behavior

plenary.nvim should not be disabled because lazydev.nvim is disabled which should invalidate all of the children specs under it.

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 = {
    -- add a random plugin as an example
    { "nvim-lua/plenary.nvim" },
    {
      "folke/lazydev.nvim",
      enabled = false, -- disable lazydev so all child specs should be ignored
      specs = {
        -- disable plenary if lazydev is enabled
        { "nvim-lua/plenary.nvim", enabled = false },
      },
    },
  },
}
@mehalter mehalter added the bug Something isn't working label Jan 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant