From cdb25b8a398dae6d72fea3e5721a7c367b2a19f1 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Fri, 28 Oct 2022 15:03:06 +0200 Subject: [PATCH] feat: better defaults for history and last --- lua/noice/config/init.lua | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/lua/noice/config/init.lua b/lua/noice/config/init.lua index f757256..1940a89 100644 --- a/lua/noice/config/init.lua +++ b/lua/noice/config/init.lua @@ -55,13 +55,29 @@ function M.defaults() -- options for the message history that you get with `:Noice` view = "split", opts = { enter = true, format = "details" }, - filter = { event = { "msg_show", "notify" }, ["not"] = { kind = { "search_count", "echo" } } }, + filter = { + any = { + { event = "notify" }, + { error = true }, + { warning = true }, + { event = "msg_show", kind = { "" } }, + { event = "lsp", kind = "message" }, + }, + }, }, -- :Noice last last = { view = "popup", opts = { enter = true, format = "details" }, - filter = { event = { "msg_show", "notify" }, ["not"] = { kind = { "search_count", "echo" } } }, + filter = { + any = { + { event = "notify" }, + { error = true }, + { warning = true }, + { event = "msg_show", kind = { "" } }, + { event = "lsp", kind = "message" }, + }, + }, filter_opts = { count = 1 }, }, -- :Noice errors