fix(mini.animate): disable when in Neovide

This commit is contained in:
Folke Lemaitre 2024-11-27 17:09:59 +01:00
parent c02275919e
commit 66459f9361
No known key found for this signature in database
GPG key ID: 41F8B1FBACAE2040

View file

@ -3,7 +3,8 @@ return {
"echasnovski/mini.animate", "echasnovski/mini.animate",
recommended = true, recommended = true,
event = "VeryLazy", event = "VeryLazy",
opts = function() cond = vim.g.neovide == nil,
opts = function(_, opts)
-- don't use animate when scrolling with the mouse -- don't use animate when scrolling with the mouse
local mouse_scrolled = false local mouse_scrolled = false
for _, scroll in ipairs({ "Up", "Down" }) do for _, scroll in ipairs({ "Up", "Down" }) do
@ -32,7 +33,7 @@ return {
}):map("<leader>ua") }):map("<leader>ua")
local animate = require("mini.animate") local animate = require("mini.animate")
return { return vim.tbl_deep_extend("force", opts, {
resize = { resize = {
timing = animate.gen_timing.linear({ duration = 50, unit = "total" }), timing = animate.gen_timing.linear({ duration = 50, unit = "total" }),
}, },
@ -48,6 +49,6 @@ return {
end, end,
}), }),
}, },
} })
end, end,
} }