rcarriga / nvim-notify

A fancy, configurable, notification manager for NeoVim
MIT License
2.97k stars 78 forks source link

The message box for vim.notify is not displayed for a long enough time #165

Open yyy33 opened 1 year ago

yyy33 commented 1 year ago

When I call vim.notify in an autocommand, the message box doesn't show up long enough, it just blinks and disappears

vim.api.nvim_create_autocmd({'BufReadPost'}, {
        callback = function(context)
        vim.notify(
                'test',
                "info",
                { title = 'title' }
                )
        end,
        })
yyy33 commented 1 year ago

I delayed the execution of the function by 500 milliseconds, and it displayed correctly


vim.api.nvim_create_autocmd({'BufReadPost'}, {
        callback = function(context)
        vim.defer_fn(function ()
                vim.notify(
                    'test',
                    "info",
                    { title = 'title' }
                    )
                end, 500)
        end,
        })
rcarriga commented 1 year ago

I don't have the same issue. I'm guessing you have another autocmd interfering with the window. If you can reproduce with a minimal init then I can investigate further

yyy33 commented 1 year ago

I don't have the same issue. I'm guessing you have another autocmd interfering with the window. If you can reproduce with a minimal init then I can investigate further

Then it seems to be my configuration, it will take me some time to find out, because I have installed many plugins, I will give feedback when I find the reason