ahmedkhalf / project.nvim

The superior project management solution for neovim.
Apache License 2.0
1.29k stars 119 forks source link

Error in project.lua:70 - attempt to index local 'dir' (a nil value) #128

Open Gremious opened 11 months ago

Gremious commented 11 months ago

Using project with nvim-tree and a visual nvim client (neovide). I changed my directory via vim.api.nvim_command(vim.cmd.edit(...)) to a directory outside of my project, open/closed nvim tree a few times, this happens:

image

However, also happens a lot easier with just launching nvim-qt from the Windows start menu (and probably from a shortcut?), not from a terminal: image

nothing too speical in config, though I was testing with a pattern that is not present in to the directory I changed to.

    {
        "ahmedkhalf/project.nvim",
        config = function()
            require("project_nvim").setup({
                detection_methods = { "pattern" },
                scope_chdir = "tab",
                patterns = {
                    "target",
                    ">dev",
                },
            })

            require('telescope').load_extension('projects')
        end
    },

Seems like dir doesn't always exist and should perhaps be waited for or gotten in another way.