nvim-neotest / neotest

An extensible framework for interacting with tests within NeoVim.
MIT License
2.3k stars 115 forks source link

Update open buffer positions on `BufEnter`? #360

Closed mrcjkb closed 7 months ago

mrcjkb commented 8 months ago

I've noticed the following behaviour with my rustaceanvim adapter:

:e foo.rs
:Neotest run " runs tests
:e bar.rs
:Neotest run " outputs No tests found
:w
:Neotest run " runs tests

It appears that, the positions for the previous buffer are cleared, and not found in the update (possibly because there's no LSP client attached to the inactive buffer).

Would it be feasible to add a BufEnter autocmd that updates the positions for the current buffer, if there are none?

https://github.com/nvim-neotest/neotest/blob/89a5b1fc22ee5d459262955fe564c3d14e35fd67/lua/neotest/client/init.lua#L395

mrcjkb commented 7 months ago

This will be fixed with https://github.com/mrcjkb/rustaceanvim/pull/223