fix(mini.animate): schedule the toggle mapping to correctly take effect

This commit is contained in:
Iordanis Petkakis 2025-09-20 22:03:31 +03:00
parent b4606f9df3
commit 2085cf8045

View file

@ -32,6 +32,9 @@ return {
end, end,
}) })
-- schedule setting the mapping to override the default mapping from `keymaps.lua`
-- seems `keymaps.lua` is the last event to execute on `VeryLazy` and it overwrites it
vim.schedule(function()
Snacks.toggle({ Snacks.toggle({
name = "Mini Animate", name = "Mini Animate",
get = function() get = function()
@ -41,6 +44,7 @@ return {
vim.g.minianimate_disable = not state vim.g.minianimate_disable = not state
end, end,
}):map("<leader>ua") }):map("<leader>ua")
end)
local animate = require("mini.animate") local animate = require("mini.animate")
return vim.tbl_deep_extend("force", opts, { return vim.tbl_deep_extend("force", opts, {