fix(snacks): view => style

This commit is contained in:
Folke Lemaitre 2024-11-06 10:56:40 +01:00
parent f4717e26cc
commit 048d5deca5
No known key found for this signature in database
GPG key ID: 41F8B1FBACAE2040
2 changed files with 5 additions and 4 deletions

View file

@ -110,7 +110,7 @@ return {
}) })
end end
-- snacks float -- snacks terminal
for _, pos in ipairs({ "top", "bottom", "left", "right" }) do for _, pos in ipairs({ "top", "bottom", "left", "right" }) do
opts[pos] = opts[pos] or {} opts[pos] = opts[pos] or {}
table.insert(opts[pos], { table.insert(opts[pos], {

View file

@ -72,8 +72,9 @@ function M.open(file, opts)
end end
end end
Snacks.config.view("news", { Snacks.config.style("news", {
win = { width = 0.6, height = 0.6 }, width = 0.6,
height = 0.6,
wo = { wo = {
spell = false, spell = false,
wrap = false, wrap = false,
@ -85,7 +86,7 @@ function M.open(file, opts)
local float = Snacks.win({ local float = Snacks.win({
file = file, file = file,
view = "news", style = "news",
}) })
if vim.diagnostic.enable then if vim.diagnostic.enable then