Skip to content
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

vim.treesitter.parse_query() error. maybe README is just the problem? #69

Open
GitMurf opened this issue Feb 15, 2024 · 1 comment
Open

Comments

@GitMurf
Copy link

GitMurf commented Feb 15, 2024

Not sure if there was a regression at some point that let this creep in, or if the docs have just always been outdated, but when you copy the default config options from the readme from here: https://github.com/lukas-reineke/headlines.nvim?tab=readme-ov-file#setup

It tells you to use vim.treesitter.parse_query() which throws an error. This was actually changed a year ago to be fixed but maybe the docs never got updated? see this PR: #51

In addition, the treesitter api has changed again so now even using from that PR vim.treesitter.query.parse_query() is deprecated, but it just gives you a warning and still lets you use it for now.

The latest and greatest API to use is using vim.treesitter.query.parse().

TLDR: need to use vim.treesitter.query.parse() going forward and need to update the readme to reflect that.

@GaetanLepage
Copy link

I think, this only concerns the README/doc.
Fixed in #76

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants