folke / noice.nvim

💥 Highly experimental plugin that completely replaces the UI for messages, cmdline and the popupmenu.
Apache License 2.0
4.39k stars 102 forks source link

bug: cannot disable messages #941

Closed dudicoco closed 1 month ago

dudicoco commented 2 months ago

Did you check docs and existing issues?

Neovim version (nvim -v)

v0.9.5

Operating system/version

MacOs Sonoma 14.4.1

Describe the bug

Setting messages to enabled = false does nothing, I still get message notifications.

Steps To Reproduce

  1. Disable messages in config

Expected Behavior

Message notifications should not show.

Repro

return {
    {
        "folke/noice.nvim",
        event = "VeryLazy",
        dependencies = {
            "MunifTanjim/nui.nvim",
            "rcarriga/nvim-notify",
        },
        config = function()
            require("noice").setup({
                messages = {
                    enabled = false,
                },
            })
        end,
    },
}
eliasnorrby commented 1 month ago

TL;DR: try:

messages = {
  enabled = false,
},
notify = {
  enabled = false,
}

Your reproduction lacks an example of a message you expect to not show.

For me, disabling messages makes it so that e.g. running:

:lua print('hello')

produces a message shown in the cmdline, i.e. not handled by noice.

My impression is that things like the LSP will call vim.notify directly. If you want to get rid of those, you need to disable notify too.

folke commented 1 month ago

that just disabled the messages integrations. Notifications are a NEovim feature, which would of cours still go through. That's not noice

dudicoco commented 1 month ago

disabling both messages and notify fixed the problem, thanks!