Closed zspher closed 2 months ago
There's been a few breaking changes in Zig lately. I patched them up in main
branch and was able to run tests again.
Looking at the error message it seems like you might be having a different issue than the ones I fixed though.
Could you run :checkhealth nvim-treesitter
to make sure that treesitter is configured correctly?
Hi! I have also run into this problem. Checkhealth returns no errors for me. Looking at the output from treesitter playground I think that the name of at least one of the nodes changed from TestDecl
to test_declaration
. Although I am not sure, because I don't really know how treesitter works internally.
Seems like I've found the issue: https://github.com/nvim-treesitter/nvim-treesitter/commit/ba921c9aef386ad895b0a6551968126ff90a288d
I'll probably have to update the queries, but that also means everyone will have to update their treesitter. Hm... Maybe there's a way to check which grammar is used and provide appropriate queries
I updated the query to match the new zig parser, let me know if this solves the issue for you.
It works for me. Thanks!
Describe the bug whenever i run neotest with neotest-zig, the tests aren't loaded and i get the ff. error:
Steps To Reproduce
zig init
:Neotest run
in neovimCurrent behavior
neotest-zig outputs a treesitter error
Expected behavior
neotest-zig should be able to find all tests
Screenshots
If applicable, add screenshots to help explain your problem.
Logs
Enable logs with:
Open logs with:
:exe 'edit' stdpath('log').'/neotest-zig.log'
changed homedir with ~/
Environment
Linux 6.6.47, NixOS, 24.11 (Vicuna), 24.11.20240821.c374d94
zig-0.14.0-dev.1421+f87dd43c1
neovim-0.10.1
commit 6d6ad11
commit ec7400e
Additional context
Add any other context about the problem here.