diff --git a/lua/lazyvim/plugins/extras/ui/mini-animate.lua b/lua/lazyvim/plugins/extras/ui/mini-animate.lua index b71c19a9..11a13cc1 100644 --- a/lua/lazyvim/plugins/extras/ui/mini-animate.lua +++ b/lua/lazyvim/plugins/extras/ui/mini-animate.lua @@ -32,15 +32,19 @@ return { end, }) - Snacks.toggle({ - name = "Mini Animate", - get = function() - return not vim.g.minianimate_disable - end, - set = function(state) - vim.g.minianimate_disable = not state - end, - }):map("ua") + -- 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({ + name = "Mini Animate", + get = function() + return not vim.g.minianimate_disable + end, + set = function(state) + vim.g.minianimate_disable = not state + end, + }):map("ua") + end) local animate = require("mini.animate") return vim.tbl_deep_extend("force", opts, {