noice.nvim icon indicating copy to clipboard operation
noice.nvim copied to clipboard

bug: `format.level.icons` configuration isn't honored by nvim-notify backend

Open SuperCuber opened this issue 1 year ago • 2 comments

Did you check docs and existing issues?

  • [X] I have read all the noice.nvim docs
  • [X] I have updated the plugin to the latest version before submitting this issue
  • [X] I have searched the existing issues of noice.nvim
  • [X] I have searched the existing issues of plugins related to this issue

Neovim version (nvim -v)

v.10.0

Operating system/version

Windows 10

Describe the bug

Using suggested configuration for Unicode symbols instead of Nerd Icons does not work in nvim-notify backend.

Steps To Reproduce

  1. Use repro.lua
  2. Run echoerr "test"
  3. See that notification icon is not the unicode X but instead (for me) displays as invalid character

Expected Behavior

Icon should be the specified X character from format.level.icons.error

Note that this configuration option does work with the backend that is selected if I remove the dependencies section from the repro.

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/noice.nvim",
            opts = {
                cmdline = {
                    format = {
                        cmdline = { icon = ">" },
                        search_down = { icon = "🔍⌄" },
                        search_up = { icon = "🔍⌃" },
                        filter = { icon = "$" },
                        lua = { icon = "☾" },
                        help = { icon = "?" },
                    },
                },
                format = {
                    level = {
                        icons = {
                            error = "✖",
                            warn = "▼",
                            info = "●",
                        },
                    },
                },
                popupmenu = {
                    kind_icons = false,
                },
                inc_rename = {
                    cmdline = {
                        format = {
                            IncRename = { icon = "⟳" },
                        },
                    },
                },
            },
            dependencies = {
                -- if you lazy-load any plugin below, make sure to add proper `module="..."` entries
                "MunifTanjim/nui.nvim",
                -- OPTIONAL:
                --   `nvim-notify` is only needed, if you want to use the notification view.
                --   If not available, we use `mini` as the fallback
                "rcarriga/nvim-notify",
            },
        },
        -- add any other plugins here
    },
})

SuperCuber avatar Jul 19 '24 15:07 SuperCuber

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days.

github-actions[bot] avatar Aug 19 '24 01:08 github-actions[bot]

Same here, it doesn't work.

@SuperCuber @folke

Here's my workaround (using lazy):

return {
  'folke/noice.nvim',
  event = 'VeryLazy',
  opts = {},
  dependencies = {
    -- if you lazy-load any plugin below, make sure to add proper `module="..."` entries
    'MunifTanjim/nui.nvim',
    -- OPTIONAL:
    -- `nvim-notify` is only needed, if you want to use the notification view.
    -- If not available, we use `mini` as the fallback
    {
      'rcarriga/nvim-notify',
      opts = {
        icons = {
          ERROR = [[ ]],
          WARN = [[ ]],
          INFO = [[ ]],
        },
      },
    },
  }
}

vricop avatar Aug 25 '24 19:08 vricop

That needs to be configured using nvim-notify

folke avatar Sep 19 '24 06:09 folke