From a3070f3c0829db5f3627ba3633615f43555a435c Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Mon, 4 Nov 2024 22:13:30 +0100 Subject: [PATCH] feat(snacks): news view can now be customized --- lua/lazyvim/util/news.lua | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/lua/lazyvim/util/news.lua b/lua/lazyvim/util/news.lua index d0ad4782..ae8895b7 100644 --- a/lua/lazyvim/util/news.lua +++ b/lua/lazyvim/util/news.lua @@ -72,8 +72,7 @@ function M.open(file, opts) end end - local float = Snacks.win({ - file = file, + Snacks.config.view("news", { win = { width = 0.6, height = 0.6 }, wo = { spell = false, @@ -83,6 +82,12 @@ function M.open(file, opts) conceallevel = 3, }, }) + + local float = Snacks.win({ + file = file, + view = "news", + }) + if vim.diagnostic.enable then pcall(vim.diagnostic.enable, false, { bufnr = float.buf }) else