return { 'noice.nvim', event = 'DeferredUIEnter', keys = { { 'n', '', 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', 'which-key.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, }, }) local mkKey = MarleyVim.wkSpec(require('colors').notifications) require('which-key').add({ mkKey('', nil, '', { mode = 'c' }), mkKey('', nil, '', { mode = { 'i', 'n', 's' } }), mkKey('', nil, '', { mode = { 'i', 'n', 's' } }), }) end, }