Open natewallis opened 1 year ago
Hey, sorry. Were you able to solve it?
Hello @jfpedroza
I'm getting related behavior. I'm using Lazyvim too. When I run neotest I got No test found
message.
Any suggestions?
Does it happen only with Elixir? Have you tried another adapter?
@garaujodev the only solution I've been able to come up with is to set the lazy
setting to false :/
another solution i just found involves setting the typical config
setup step to the init
function.
This is less-than ideal as it's going to mean initializing a neotest adapter I might not ever use. But, at least it doesn't load the entire plugin :shrug:
@jfpedroza I can confirm that using ft
-based lazy-loading for python
's neotest-python
adapter works just fine.
I recently migrated from packer to lazy and haven't really tried lazy loading. I have my config in after/plugin/neotest.lua
.
As I understand it, if you specify all the adapters in neotest.setup()
, they will all be loaded together. If you want to load the adapter only if you need it, you should use neotest.setup_project()
to set up the adapters for a specific project.
For example, I have in my .nvim.lua
in my Elixir project:
vim.schedule(function()
require("neotest").setup_project(vim.loop.cwd(), {
adapters = {
require("neotest-elixir")({
mix_task = "test.interactive",
extra_formatters = { "ExUnit.CLIFormatter", "ExUnitNotifier" },
}),
},
})
end)
Adapters are not standalone neovim plugins. They are always loaded by a call when you are setting up neotest.
Hi,
I am using Lazy to load plugins into NVIM and I am getting no feedback when running
lua require("neotest").run.run()
Here is my NVIM config for testing. I had previously installed vim-test, but then saw the developer was moving to a new project, so I installed that instead.
When I attempt to run the tests, it does nothing and I see no running tests. I am running the tests inside a vanilla scaffolded phoenix project.
Should I see a popup on the screen with test results?