return { "folke/noice.nvim", event = "VeryLazy", dependencies = { -- if you lazy-load any plugin below, make sure to add proper `module="..."` entries "MunifTanjim/nui.nvim", -- OPTIONAL: -- `nvim-notify` is only needed, if you want to use the notification view. -- If not available, we use `mini` as the fallback { "rcarriga/nvim-notify", opts = { background_colour = "#000000", }, }, }, opts = { presets = { bottom_search = true, -- command_palette = true, long_message_to_split = true, inc_rename = true, }, 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", }, { filter = { event = "msg_show", kind = "search_count", }, opts = { skip = true }, }, }, views = { cmdline_popup = { position = { row = 5, col = "50%", }, size = { width = 60, height = "auto", }, }, popupmenu = { relative = "editor", position = { row = 8, col = "50%", }, size = { width = 60, height = 10, }, border = { style = "rounded", padding = { 0, 1 }, }, win_options = { winhighlight = { Normal = "Normal", FloatBorder = "DiagnosticInfo" }, }, }, }, }, -- stylua: ignore keys = { { "", function() require("noice").redirect(vim.fn.getcmdline()) end, mode = "c", desc = "Redirect Cmdline" }, { "unl", function() require("noice").cmd("last") end, desc = "Noice Last Message" }, { "unh", function() require("noice").cmd("history") end, desc = "Noice History" }, { "una", function() require("noice").cmd("all") end, desc = "Noice All" }, { "und", function() require("noice").cmd("dismiss") end, desc = "Dismiss All" }, { "", function() if not require("noice.lsp").scroll(4) then return "" end end, silent = true, expr = true, desc = "Scroll forward", mode = { "i", "n", "s" } }, { "", function() if not require("noice.lsp").scroll(-4) then return "" end end, silent = true, expr = true, desc = "Scroll backward", mode = { "i", "n", "s" } }, }, }