Closed dez11de closed 1 week ago
Strange, not sure what's wrong on your end. Do you have an up to date Neotest version? Perhaps try another go project / repo? You can try this one, the neotest-golang one, and you should see Go tests appearing.
Everything is up-to-date. Same thing happens in other repo's. If I run :lua require('neotest').summary.toggle(), the summary split opens saying No tests found. When I run :Lua require('neotest').watch.watch(vim.fn.cwd()) I get all the errors listed above.
Do you see something suspicious from the Neotest logs?
require("neotest.logging"):set_level(vim.log.levels.DEBUG)
local logfile = require("neotest.logging"):get_filename()
vim.notify(logfile) -- print the path to the log file
Logfile stays completely empty...
I can see a bunch of other languages there in the error message. Do you have another adapter installed that could be interfering?
Can you try to disable any other adapters?
I would uninstall (hit x
in lazy.nvim for example) and reinstall Neotest and Treesitter too.
It's somewhat strange that the term "No position found with args" doesn't exist in either Neotest or Treesitter source code. I just searched here from GitHub mobile.
The (other) languages that are visible in the error message, seem to come from the neotest default configuration judging from :help neotest.setup
I have no other adapters installed whatsoever. I've removed the ~/.local/state/nvim and /?./local/share/nvim dirs (I am on a Mac) and reinstalled everything from scratch. Doesn't make a difference.
FWIW if I start neotest with neotest-go adapter and open the test summary this shows up in the logfile:
DEBUG | 2024-06-20T23:51:01Z+0200 | ...al/share/nvim/lazy/neotest/lua/neotest/lib/file/init.lua:225 | Path separator: /
DEBUG | 2024-06-20T23:51:11Z+0200 | ...al/share/nvim/lazy/neotest/lua/neotest/lib/file/init.lua:225 | Path separator: /
Hi,
I'm trying to make the switch from neotest-go to neotest-golang.
I've used this configuration:
Which allows me to open a go file, it's testfile, press
<Leader>n
. This would open the test summary with all tests. When I save go file all the tests are being run. This works perfectly for me.After finding out about neotest-golang, I've changed my configuration to:
Now, when I open the same .go and it's testfile press
<Leader>n
I get the following:And the neotest summary split says:
No tests found
What would I need to change to get neotest-golang working?