pojokcodeid.nvim-lazy/lua/custom/plugins/mini-animate.lua

47 lines
1.2 KiB
Lua
Raw Permalink Normal View History

2024-05-17 07:05:11 +07:00
local is_neovide = false
if vim.g.neovide then
2024-06-02 06:48:51 +07:00
is_neovide = true
2024-05-17 07:05:11 +07:00
end
2023-02-24 22:43:48 +07:00
return {
2024-06-02 06:48:51 +07:00
-- animations
-- {
-- "echasnovski/mini.animate",
-- event = "BufRead",
-- enabled = not is_neovide,
-- opts = function()
-- -- don't use animate when scrolling with the mouse
-- local mouse_scrolled = false
-- for _, scroll in ipairs({ "Up", "Down" }) do
-- local key = "<ScrollWheel" .. scroll .. ">"
-- vim.keymap.set({ "", "i" }, key, function()
-- mouse_scrolled = true
-- return key
-- end, { expr = true })
-- end
--
-- local animate = require("mini.animate")
-- return {
-- resize = {
-- timing = animate.gen_timing.linear({ duration = 100, unit = "total" }),
-- },
-- scroll = {
-- timing = animate.gen_timing.linear({ duration = 150, unit = "total" }),
-- subscroll = animate.gen_subscroll.equal({
-- predicate = function(total_scroll)
-- if mouse_scrolled then
-- mouse_scrolled = false
-- return false
-- end
-- return total_scroll > 1
-- end,
-- }),
-- },
-- }
-- end,
-- config = function(_, opts)
-- require("mini.animate").setup(opts)
-- end,
-- },
2023-02-24 22:43:48 +07:00
}