I’ve managed to get this installed with my LazyVim setup (I think) but if I use tt I get this message:
[neotest-swift-testing]|DEBUG|2025-09-02T16:32:52Z+1000|...neotest-swift-testing/lua/neotest-swift-testing/init.lua:433 Position not found: h2hTests.h2hTests/
Is there a place I should be configuring paths or something? If you can help me figure it out, I’d be glad to submit a PR documenting it nicely for others.
I decided to try to find minimal steps to reproduce this and here they are. I’m working on a Vapor project and it turns out their default “hello world” project can reproduce this behaviour for me.
On the command line:
brew install vapor
vapor new hello -n
cd hello
swift build
nvim Tests/helloTests/helloTests.swift
Then in LazyVim I type tT to run all tests, and see the output below:
I’m new to LazyVim (but old enough to have used the original vi extensively), so I may have broken something in my configuration. Given that, I’ve linked to a .tgz file containing my .config/nvim directory contents. I haven’t tried sharing with dropbox before so let me know if it doesn’t work:
@sarah , do you have treesitter configured for Swift? I believe the neotest-swift-testing plugin uses a Treesitter query for test discovery, so you’d need to configure that in your LazyVim setup.
I’m not super familiar with LazyVim, so you’ll have to refer the distro’s docs for guidance on how to add it. However, best I can tell, Swift isn’t enabled by default: TreeSitter | LazyVim
It rings a bell but I’ll check my configuration to make sure. It might take me a day or so to get back to my personal projects computer but I’ll have the info soon.
I added your suggested configuration into .config/nvim/lua/plugins to ensure LazyVim was loading it and suddenly got different messages, about not finding the tree-sitter command line and then when I installed that about not finding node.