Failed to parse error query - treesitter query uses non-existent statement_list node #24
Labels
No labels
bug
dev
documentation
duplicate
enhancement
good first issue
help wanted
improvement
invalid
question
testing
wontfix
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
noe.trevino/no-go.nvim#24
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem:
The error_query in lua/no-go/queries.lua references statement_list which doesn't exist in the current Go treesitter grammar. Statements are directly children of block node .
Error:
Fix:
Remove statement_list wrapper from the query:
-- Before (broken)
-- After (working)
Would like to contribute, or here is the solution.
File: lua/no-go/queries.lua
Replace this:
With this:
Changes:
Hello! Thanks for opening the ticket and the PR. I have to say, I have no experienced this issue. Are you on the treesitter main or master branch? This has been discussed prior: https://github.com/TheNoeTrevino/no-go.nvim/issues/7
If you are on the main branch, and have an up to date parser, could you please send me a test file to reproduce?
Thanks