-
-
Notifications
You must be signed in to change notification settings - Fork 74
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(neotest): nested modules + position updates when switching buffers #223
Conversation
Review ChecklistDoes this PR follow the Contribution Guidelines? Following is a partial checklist: Proper conventional commit scoping:
If applicable:
|
Head branch was pushed to by a user without write access
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, this is great! 🙏
Just some small comments...
I've removed the dir position as well as that was restricting neotest to a single file rather than the project directory, and was also preventing positions being updated when changing buffers.
This fixes #208, which is great.
However, it also means that the neotest test_executor
can't be used with "all targets" runnables when using :RustLsp testables
. I'll have to come up with a solution for that.
I've implemented a fix for that, so it should work if you rebase 😄
Looks like pre-commit-run> Checking lua/rustaceanvim/neotest/init.lua 2 warnings
pre-commit-run> lua/rustaceanvim/neotest/init.lua:49:38: unused argument name
pre-commit-run> lua/rustaceanvim/neotest/init.lua:49:54: unused argument root |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks again for the great work 🙏 😄
This PR fixes calculating positions for nested test modules.
I've removed the
dir
position as well as that was restricting neotest to a single file rather than the project directory, and was also preventing positions being updated when changing buffers.I also had to add some naive matching logic to
is_test_file
as without the overridendir
position neotest will show all.rs
files in the project directory, even if they contain no tests.Before
After