nvim-notify icon indicating copy to clipboard operation
nvim-notify copied to clipboard

bug(vim-visual-multi): Notification window doesn't expand or have black color

Open ilias777 opened this issue 1 year ago • 1 comments

The notifications that comes from vim-visual-multi are not expand if stages = 'slide' in the options and it's not possible to see the content.

slide_1 slide_2

If stages is set to fade the color is black or sometimes the same color as the background.

black_1 black_2

If you look here closely the notification color is same as the background. After the l in the second line you can see the icon from the notification:

same_as_bg

Steps to reproduse:

  1. Create a file repro.lua
vim.env.LAZY_STDPATH = ".repro"
load(vim.fn.system("curl -s https://raw.githubusercontent.com/folke/lazy.nvim/main/bootstrap.lua"))()

vim.g.mapleader = ','
vim.g.maplocalleader = ','

vim.opt.autoindent = true
vim.opt.smartindent = true
vim.opt.tabstop = 4
vim.opt.shiftwidth = 4
vim.opt.softtabstop = 4
vim.opt.expandtab = true

require("lazy.minit").repro({
    spec = {
        {
            'nvim-treesitter/nvim-treesitter',
            build = ':TSUpdate',
            config = function()
                require('nvim-treesitter.configs').setup({
                    ensure_installed = {
                        'lua'
                    },
                })
            end
        },
        {
	    "mg979/vim-visual-multi",
            branch = "master",
            event = 'VeryLazy',
		    keys = {
                      { 'cp', 'vip<Plug>(VM-Visual-Cursors)', desc = 'Create multicursors inner paragraph' },
                      { '<M-s>', ':VMSearch ', mode = 'x', desc = 'Search & create multicursors in visual mode' },
                      { '<M-s>', ':%VMSearch ', desc = 'Search & create multicursors' },
                      { '<M-c>', '<Plug>(VM-Visual-Cursors)', mode = 'x', desc = 'Create multicursors in visual mode' },
		    },
            init = function()
                vim.g.VM_maps = {
                    ['Motion ,'] = '',
                    ['Select l'] = '<C-Right>',
                    ['Select h'] = '<C-Left>',
                    ['Goto Next'] = '',
                    ['Goto Prev'] = '',
                    -- ['I BS'] = '',
                }
            end
	    },
	    {
            "folke/which-key.nvim",
            opts = {
                preset = 'helix',
            },
        },
            {
            "folke/noice.nvim",
            dependencies = {
                "MunifTanjim/nui.nvim",
                {
                    "rcarriga/nvim-notify",
                    opts = {
                        render = 'wrapped-compact',
                        stages = 'slide,
                        max_height = function()
                            return math.floor(vim.o.lines * 0.75)
                        end,
                        max_width = function()
                            return math.floor(vim.o.columns * 0.75)
                        end,
                    },
                },
            },
            opts = {}
        },
    },
})
  1. Run: nvim -u repro.lua.
  2. After lazy installing the plugins rerun Neovim.
  3. Run again the command nvim -u repro.lua.
  4. Open the file with the command :e repro.lua.
  5. Press following keys: <C-n> to start vim-visual-multi and then the keys: \\C to open the notification window to switch the case in this example.
  6. You will see that the notification window is not expanding.
  7. Try to change the stages to fade or fade_in_slide_out.
  8. Press the same keys like in step 3.
  9. The notification window now is black or the same color as the background.

Thank you for any help. 🙂

ilias777 avatar Jul 22 '24 19:07 ilias777