Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

attempt to call field 'isarray' (a nil value) - some kind of configuration problem #144

Open
goolord opened this issue Oct 18, 2024 · 6 comments
Labels
bug Something isn't working

Comments

@goolord
Copy link

goolord commented Oct 18, 2024

image when using the lazy package manager, I get this error when `lazy = true` isn't specified.

I guess it's some problem with when the SessionLoad* event is field and when the code that defines vim.isarray is evaluated, but I'm unsure. I would maybe just consider not using vim.isarray, but feel free to just close this if you don't want to support the insane number of permutations neovim configurations come in.

thought this might be helpful to other end users anyways

@goolord goolord added the bug Something isn't working label Oct 18, 2024
@Shatur
Copy link
Owner

Shatur commented Oct 18, 2024

Duplicate of #127.

@Shatur Shatur closed this as completed Oct 18, 2024
@goolord
Copy link
Author

goolord commented Oct 18, 2024

not a duplicate - this is not caused by erroneous configuration or an outdated version of neovim. it's a similar error caused by a separate problem

@Shatur
Copy link
Owner

Shatur commented Oct 18, 2024

The issue in this line:

if not vim.isarray(config.autoload_mode) then

Something is wrong with either your version of Neovim or config.autoload_mode.

@goolord
Copy link
Author

goolord commented Oct 18, 2024

    {
        'Shatur/neovim-session-manager',
        config = function()
            -- vim.isarray = function () return false end
            require('session_manager').setup {
                autoload_mode = require('session_manager.config').AutoloadMode.CurrentDir,
                autosave_last_session = true,
            }
        end,
        dependencies = {
            'nvim-lua/plenary.nvim',
        }
    };

looks completely fine to me, does not error if I define vim.isarray

@Shatur
Copy link
Owner

Shatur commented Oct 18, 2024

Weird, not sure why it happens...

@Shatur Shatur reopened this Oct 18, 2024
@Njima1572
Copy link

Njima1572 commented Nov 23, 2024

I encountered the same problem, and it could be because of using nvim v10.0-dev
This version of neovim doesn't seem to have vm.isarray, but instead has vim.tbl_isarray

neovim/neovim#24572
neovim/neovim@7caf0ea

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants