headlines.nvim icon indicating copy to clipboard operation
headlines.nvim copied to clipboard

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

Open GitMurf opened this issue 2 years ago • 1 comments

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: https://github.com/lukas-reineke/headlines.nvim/pull/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.

GitMurf avatar Feb 15 '24 17:02 GitMurf

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

GaetanLepage avatar Mar 28 '24 13:03 GaetanLepage