no-go.nvim: Failed to parse query. Try updating the parser with :TSUpdate go #7
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#7
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?
error
after add log and report
...os-arm64/share/nvim/runtime/lua/vim/treesitter/query.lua:374: Query error at 6:8. Invalid node type "statement_list": (statement_listafter exec
TSUpdate gonothing happenhttps://github.com/user-attachments/assets/7d71ff1b-e8cb-4d81-a0d6-1b8a056afab7
test file
main.go
version
nvim
NVIM v0.12.0-dev-1622+g30634f63e2 Build type: RelWithDebInfo LuaJIT 2.1.1763148144 Run "nvim -V1 -v" for more infotressiter
master or main lastest also happen
check
checkhealth nvim-treesitter
checkhealth vim.treesitter
same here. after remove the (statement_list), the query would get parsed.
I will take a look at this soon. Thanks for reporting in such a helpful way. It helps!
@tiejunhu Are you also on the v.12 of neovim?
@edte I have looked into this with the test file, and it seems to work fine.
Are you both sure that you are on the main branch of Treesiter, and fully updated?
The error you are getting,
I will take a closer look this weekend, but the fact that both:
Makes me think that there is something strange/outdated with your installation of treesitter.
Are you sure the test file replicated this issue?
the main branch of Treesiter and lastest commit
the test file replicated this issue
and the error is
I have the same issue, and use nvim 0.11.5 (macos). Here is the log when I try with the sample file
My bad. I'm on treesitter's master branch. After I switch to main branch, the issue is gone.
Didn't notice that treesitter switched latest branch from master to main.
Everyone with this issue should double check the treesitter config. The main branch of treesitter is not the default branch. You need to specify it.
yes, my nvim-treesitter still on master branch and switching to main creates so many issues with other settings / configs / plugins.
@longthanhtran
@edte
Sorry guys, but I will not be supporting the master branch of Treesitter. Please read their readme, as the main branch (which is not the default branch) will become the new default branch at some point.
Supporting the branch that is planned to be deprecated it not a good idea.
Read the comment @tiejunhu left, as switching to the 'main' branch fixed the issue for him. If switching to the main branch is giving you issues, I suggest taking some time to work through it.
I will be closing out this issue, and labeling it as won't fix.
You are more than welcome to fork the repository and delete the statement list line.
Sorry for comment on this closed issue, just want to update from my side. nvim-treesitter still on master (the freezing branch) and with all standard settings on my nvim. It works, but only case with
returnso if the optional operator moves 1 level in the error_query then this should cover both cases, with / without
returnAh yes, i though about this. I decided against it. In Go, the error handing pattern is, the caller of the function deals with the error. I did not want to fold that! As sometimes, those consequences without returns, are things that should not be concealed. Such as, a panic. This also stops potentially dangerous code from being hidden. I dont like the idea of hiding err consequences without returns.
But, this is opinionated. If you want that as a feature, you can open an issue, and i can make it optional. This is out of the scope of this issue, though.