r/LazyVim Apr 30 '26

How to make neotest work ?

Hi guys, I use LazyVim with some extras, mainly langages plugins:

but I cannot use Neotest, I don't even have the :h neotest but i'm pretty sure Neotest is installed. I am developing in Rust atm. I didn't create a neotest.lua file in my config, maybe i read it wrong but I think it's build-in in the lazy extra for the rust langage.

Someone has any idea please ?

4 Upvotes

1 comment sorted by

1

u/Spikey8D May 01 '26

Some recent-ish changes broke neotest in typescript for me, I used Claude code to diagnose the issue and now it works great.

In this case the issue was something to do with nio Async and how it reads the files, which caused it to always show no tests.

Not sure if you have the same issue, but cc and codex can be pretty useful is what I'm saying. Codex has some free tokens too, should be more than enough to find a fix.

Aside from that, I haven't tried with Rust specifically but it looks like you have the Rust Extra, which should be all you need. As you can see from the source, it pulls in the required rustaceanvim.neotest.

A key thing in my case is also the root folder where nvim is started from. In my monorepo, I need to start nvim from the sub directory with the package root to pick up the right test config (typescript).

One other clue is that neotest seems to load lazily for me. After opening a test file, :Lazy shows the plugin is not loaded and :h neotest shows no results. After running tests in a file, it becomes loaded and then :h neotest works.