feat(snacks): news view can now be customized

This commit is contained in:
Folke Lemaitre 2024-11-04 22:13:30 +01:00
parent a96e5dfd83
commit a3070f3c08
No known key found for this signature in database
GPG key ID: 41F8B1FBACAE2040

View file

@ -72,8 +72,7 @@ function M.open(file, opts)
end end
end end
local float = Snacks.win({ Snacks.config.view("news", {
file = file,
win = { width = 0.6, height = 0.6 }, win = { width = 0.6, height = 0.6 },
wo = { wo = {
spell = false, spell = false,
@ -83,6 +82,12 @@ function M.open(file, opts)
conceallevel = 3, conceallevel = 3,
}, },
}) })
local float = Snacks.win({
file = file,
view = "news",
})
if vim.diagnostic.enable then if vim.diagnostic.enable then
pcall(vim.diagnostic.enable, false, { bufnr = float.buf }) pcall(vim.diagnostic.enable, false, { bufnr = float.buf })
else else