nvim-neotest / neotest

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

[Question] Subprocess with `--clean` flag #430

Open KostkaBrukowa opened 3 months ago

KostkaBrukowa commented 3 months ago

Hey! I've been seeing small issue with session in nvim. Whenever I was opening neotest summary window, the session wasn't saved (it worked normally when neotest summary wasn't opened at all). I've done some digging into the code and here: https://github.com/nvim-neotest/neotest/blob/master/lua/neotest/lib/subprocess.lua#L41 I've stumbled upon this line, when you open new headless nvim instance and I found out, that if I add flag --clean:

  local cmd = { vim.loop.exepath(), "--embed", "--headless", "-n", "--clean" }

my problem disappears (the headless instance might have been overriding my session) and the neotest summary window also loads a bit faster. I was wondering if there are any possible problems of using --clean flag and why didn't you use it in the first place?