return { 'noice.nvim', event = 'DeferredUIEnter', keys = { { 'nn', '', desc = '+notifications' }, { '', function() require('noice').redirect(vim.fn.getcmdline()) end, mode = 'c', desc = 'Redirect cmdline', }, { 'nl', function() require('noice').cmd('last') end, desc = 'Last message', }, { 'nh', function() require('noice').cmd('history') end, desc = 'Message history', }, { 'na', function() require('noice').cmd('all') end, desc = 'All messages', }, { 'nd', function() require('noice').cmd('dismiss') end, desc = 'Dismiss all', }, { 'nt', function() require('noice').cmd('pick') end, desc = 'Message picker', }, { '', function() if not require('noice.lsp').scroll(4) then return '' end end, mode = { 'i', 'n', 's' }, silent = true, expr = true, desc = 'Scroll forward', }, { '', function() if not require('noice.lsp').scroll(-4) then return '' end end, mode = { 'i', 'n', 's' }, silent = true, expr = true, desc = 'Scroll backward', }, }, before = function() require('lz.n').trigger_load('nui.nvim') end, after = function() require('noice').setup({ lsp = { override = { ['vim.lsp.util.convert_input_to_markdown_lines'] = true, ['vim.lsp.util.stylize_markdown'] = true, ['cmp.entry.get_documentation'] = true, }, }, routes = { { filter = { event = 'msg_show', any = { { find = '%d+L, %d+B' }, { find = '; after #%d+' }, { find = '; before #%d+' }, }, }, view = 'mini', }, }, presets = { command_palette = true, long_message_to_split = true, lsp_doc_border = true, }, }) end, }