Closed TilGP closed 4 months ago
Hey @TilGP, thanks for giving the plugin a try :)
It looks like the line that fails is the treesitter parse call.
Could you please try running: :lua vim.treesitter.query.parse("cpp", "((function_definition) @f)")
If this doesn't work then something is wrong with the treesitter installation - if you're using a custom cpp parser (e.g., from a branch) - then try the regular one. If you're using the regular one, I'm afraid I can't suggest much - perhaps reinstalling nvim-treesitter through your plugin manager. If nothing helps, I suggest to open an issue with the nvim-treesitter folks.
thanks for the response. I have reinstalled treesitter and the cpp parser. All should be up-to-date with the master branch. could you tell me, what the command should return. Because the response is empty for me (executing during with a cpp file open). I will try to find a solution and/or open a issue in the treesitter repo
Hey @TilGP, empty output is normal, if it doesn't print an error. You can do :lua =vim.treesitter.query.parse("cpp", "((function_definition) @f)")
(with =
after lua
) which should return a table.
If that still works, but the plugin doesn't, something strange is happening. One guess is that perhaps nvim-treesitter
is not loaded at the moment that neotest-gtest
is called? If you're using lazy.nvim
(or something similar with lazy loading), try adding nvim-treesitter
to dependencies of neotest
.
I get the following error:
Although I have done
:TSInstall cpp
and:TSInstallInfo
shows cpp as installed. What did I do wrong?