Update neovim queries
Closed this issue · 6 comments
Hello, would it be possible to update neovim queries? current ecma queries seems to break things here (using Doom Emacs) as the "function" node type doesn't seem to exist anymore, and running the script to update the queries seems to fix things (probably this commit nvim-treesitter/nvim-treesitter-textobjects@aea1205 )
Thanks!
Ahh, this has been due for quite long. Should be fixed via #118
Also related: #119
If it were up to me, I would reccomend that doom move to using builtin treesit instead of emacs-tree-sitter/elisp-tree-sitter. While it might be less feature complete, looks like a lot of packages are shifting to that and seems like that is going to be the future. Also, on an related note, neovim does a lot of "non standard" things which makes maintaining those grammars harder (this package does not handle all of them as of now).
haskell, php and r queries are currently broken, but let me fix that in a quick follow-up. Way too many moving pieces with grammar versions, queries, multiple tree-sitter packages and whatever neovim is doing.
In any case, really appreciate taking the time to figure out what is going on with doom and opening the issue.
Looks like these are because emacs-tree-sitter/tree-sitter-langs is not up-to-date with the grammars. There are PRs up for it, but they have not gone in. I'll just leave these in as is for now and let the upstream resolve itself over time as these are less used languages(hopefully I won't regret this). The other option would be to disable the offending ones which will end up with same ish results. Ideally I/someone would rewrite the queries to support the grammar versions that is present in emacs-tree-sitter/tree-sitter-langs, but don't want to put that effort as of now.
Wonderful, thanks a lot! and I hope it won't cause too much troubles for others as well 😬 (I can confirm the update worked for me 😎 )
I assume Doom will move to treesit when they stop supporting older versions of Emacs. I'm of those who are not looking forward to it, as I'm currently stuck with the Emacs 27.1 of Ubuntu 22.04 at work ;)
FYI, to fix this we might just have to figure out which is the latest version of haskell, php and r queries that supports the grammar version that is in tree-sitter-langs. Should not be a lot of work, but not something I want to commit now. I'll try take a look at it within the next week.
I did it quick using the following process: enable the languages with tree sitter on my updated Doom install, open a file of each 3 languages (PHP, R, HS), type "vif", see unsupported node type, lookup in history of nvim-treesitter/nvim-treesitter-textobjects when this new syntax was introduced, fetch the old file, reload, check that the query syntax error is gone (each time it was quite recently so it made sense)