Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi,
I have been trying to get nvim-test to run rust tests that do not have
test
in the name but that are annotated with#[test]
I'm brand new to treesitter, and lua (and to rust too actually). Took me a while because you need an expression that matches a sibling from the function you are trying to find. I think you can't solve it by just fiddling with the treesitter expression and use the generic
find_nearest_test
of theRunner
but I'm not sure at all.I have tried a first implementation that works on the above example but I'm not very happy with it. I don't like the booleans that track the state of whether I have already found my targets and such, and I also guess that it might not work with other test patterns.
Questions
(I have now seen that there are specs test, I'll need to try and run them too, I have not done that yet)