ahmedkhalf/project.nvim

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

Gremious opened this issue · 0 comments

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.