Closed akinsho closed 1 year ago
Yeah this is because lazy doesn't use packpath as you said and neotest-plenary doesn't use the users init.lua
so lazy is probably not loaded.
This could be worked around by using a minimal init.lua to add plenary to the rtp. We look for one here https://github.com/rcarriga/neotest-plenary/blob/d49bfd9470f791e7c29149e75d56b6f925bb391b/lua/neotest-plenary/init.lua#L89-L97
@rcarriga that did work I had a file already that did this but had called it init.lua
I'm wondering if your glob could also check for that since it seems to only check for init.vim
which I guess is by design since maybe someone might call a file not intended for this purpose init.lua
but I'm wondering if this isn't a mistake on their part
I submitted a PR #10 that would make neotest-plenary work out-of-box (without any minimal_init.lua/vim
)
I'm cross posting this issue https://github.com/nvim-lua/plenary.nvim/issues/357#issue-1211088483, since I'm not really sure where the fix is needed but since I know that the way that modules are loaded in order to run tests in
neotest-plenary
involves loading mechanisms in a specific way based on #3. I thought there might also be something that needs fixing here.The issue is that when trying to run plenary tests (in any way) whilst using
lazy.nvim
, my guess is that this is a key factor here because lazy takes over all plugin loading and doesn't use packpath and other mechanisms like that, the following error occurs:It's hard to tell if this is because when neotest tries to load the plenary modules it tries to use the rtp or packpath in some way that no longer applies because of how lazy.nvim works.