-
Notifications
You must be signed in to change notification settings - Fork 24
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
Augment query testing procedure #37
Comments
@maxxnino if you have ideas on what would be tested or how this should be done, feel free to post them here |
I have two ideas for improving this. The first one is a quick and dirty method that I have already used from the beginning. It involves manually inspecting the highlights generated by nvim-treesitter for the new grammar and making adjustments to improve queries and auto-indent behavior. The second idea is to use treez and build our own tester similar to how nvim-treesitter works. The downside is that every time we change the grammar, we will need to update the test cases accordingly. However, this approach will quickly identify any grammar mismatches. Personally, I prefer the quick and dirty method, but it's up to you to decide which approach is best for you |
The existing query works fine, so nothing needs to be changed. I think my Neovim is just messing around with me. |
In #36 a script was added for testing that the queries can be compiled correctly, which is not the same as testing that they are producing the expected output. For the latter, we could have something like nvim-treesitter's query tests (see https://github.com/nvim-treesitter/nvim-treesitter/tree/87faf372eb517077cc600c4e653e4fb3252d02ac/tests/query, e.g. https://github.com/nvim-treesitter/nvim-treesitter/blob/87faf372eb517077cc600c4e653e4fb3252d02ac/tests/query/highlights/gleam/import.gleam).
Idea originated from #36 (comment)
The text was updated successfully, but these errors were encountered: