folke / snacks.nvim

🍿 A collection of small QoL plugins for Neovim
Apache License 2.0
836 stars 14 forks source link

bug: `enabled` field doesn't seem to take effect. #2

Closed amedoeyes closed 1 week ago

amedoeyes commented 1 week ago

Did you check docs and existing issues?

Neovim version (nvim -v)

v0.10.2

Operating system/version

Linux 6.11.6.arch1-1

Describe the bug

Setting the enabled field to false doesn't seem to do anything. Here I'm trying to disable notifier and statuscolumn but they still function.

image

When I print Snacks.config:

image

Steps To Reproduce

  1. Set the enabled field of notifier to false
  2. Display a notification with vim.notify
  3. notifier will display the notification

Expected Behavior

Disabled features should be disabled.

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 = {
        {
            "folke/snacks.nvim",
            opts = {
                statuscolumn = { enabled = false },
                notifier = { enabled = false },
            },
        },
    },
})

for i = 1, 10 do
    vim.defer_fn(function()
        vim.notify("Hello " .. i, "info", { id = "test" })
    end, i * 500)
end
iguanacucumber commented 6 days ago

this should be reopened as i'm still having this issue

roguesherlock commented 5 days ago

yeah I am also facing similar issue even with the latest release

folke commented 5 days ago

You probably wanted to disable notifier? The problem was that noice would still use snacks, even when disabled. Just fixed that in both snacks (and lazyvim if you use that)

roguesherlock commented 5 days ago

yes. Thank you so much @folke! Love all your plugins!