folke / noice.nvim

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

Configuration Issue: Not able to suppress 'No information available' notification #828

Closed DMunkei closed 4 months ago

DMunkei commented 4 months ago

Neovim Version :v0.11.0-dev-110+gffbd09ef6 OS: Linux / 6.6.30-2-MANJARO

I've tried suppressing the notification message by setting up a filter in the routes field. However, I still persists.

  1. Configure noice
  2. go to a file and use the LSP hover action on a symbol that has no information.
  3. Notification View pops up

Here's my configuration file.

return {
    "folke/noice.nvim",
    event = "VeryLazy",
    opts = {
        -- add any options here
    },
    dependencies = {
        "MunifTanjim/nui.nvim",
        "rcarriga/nvim-notify",
    },
    config = function()
        require("noice").setup({
            routes = {
                filter = {
                    event = "notify",
                    find = "No information available",
                },
        opts = {skip = true},
            },
            lsp = {
                -- override markdown rendering so that **cmp** and other plugins use **Treesitter**
                override = {
                    ["vim.lsp.util.convert_input_to_markdown_lines"] = true,
                    ["vim.lsp.util.stylize_markdown"] = true,
                    ["cmp.entry.get_documentation"] = true, -- requires hrsh7th/nvim-cmp
                },
            },
            -- you can enable a preset for easier configuration
            presets = {
                bottom_search = true, -- use a classic bottom cmdline for search
                command_palette = true, -- position the cmdline and popupmenu together
                long_message_to_split = true, -- long messages will be sent to a split
                inc_rename = false, -- enables an input dialog for inc-rename.nvim
                lsp_doc_border = true, -- add a border to hover docs and signature help
            },
        })
    end,
}
b0ae989c commented 4 months ago

routes is supposed to be a list. Try

routes = {
  {
    filter = {
      event = "notify",
      find = "No information available",
    },
    opts = {skip = true},
  },
},