Open ilias777 opened 1 month ago
After further looking into this, this is indeed something that worked before.
Reason it used to work, is that in Noice I hacked into vim.cmd.redraw
and any of the getchar
and input
functions.
When I detected that we were right before or inside such a function, I replaced stage to static
.
I did it like that, because I thought that when Neovim was waiting for input, the main loop was blocked.
Recently I discovered this is simply not the case.
tbh, this hack was something I probably never should have done.
The correct fix is to add vim.cmd.redraw()
calls when needed inside nvim-notify
.
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.If
stages
is set tofade
the color is black or sometimes the same color as the background.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:Steps to reproduse:
repro.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(VM-Visual-Cursors)', desc = 'Create multicursors inner paragraph' },
{ '', ':VMSearch ', mode = 'x', desc = 'Search & create multicursors in visual mode' },
{ '', ':%VMSearch ', desc = 'Search & create multicursors' },
{ '', '(VM-Visual-Cursors)', mode = 'x', desc = 'Create multicursors in visual mode' },
},
init = function()
vim.g.VM_maps = {
['Motion ,'] = '',
['Select l'] = '',
['Select h'] = '',
['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 = {}
},
},
})