echasnovski / mini.nvim

Library of 40+ independent Lua modules improving overall Neovim (version 0.8 and higher) experience with minimal effort
MIT License
4.88k stars 185 forks source link

mini.animate throws error when setup in the following way. #1189

Closed 231tr0n closed 2 weeks ago

231tr0n commented 2 weeks ago

Contributing guidelines

Module(s)

mini.animate

Description

When i setup mini.animate in the following way, it throws an error.

Neovim version

nightly

Steps to reproduce

vim.env.LAZY_STDPATH = ".repro"
load(vim.fn.system("curl -s https://raw.githubusercontent.com/folke/lazy.nvim/main/bootstrap.lua"))()

require("lazy.minit").repro({
        spec = {
                "echasnovski/mini.animate",
        },
})

require("mini.animate").setup({
        scroll = {
                enable = false,
        },
        cursor = {
                enable = true,
                    timing = function(_, n) return 250 / n end,
                    path = MiniAnimate.gen_path.line({
            predicate = function()
                return true
            end,
             }),
        resize = {
                enable = false,
        },
        open = {
                enable = false,
        },
        close = {
                enable = false,
        },
})

Expected behavior

Not throw an error

Actual behavior

Throws an error

231tr0n commented 2 weeks ago

NVM my bad this is a false positive. I called MiniAnimate in mini.animate setup and before the setup is called it is not exported. Sorry for raising this defect. Closing it.

echasnovski commented 2 weeks ago

Please, make sure that this is specifically a 'mini.nvim' issue. At least by trying to reproduce this in a separate config and examining the error message first.