lukas-reineke / headlines.nvim

This plugin adds horizontal highlights for text filetypes, like markdown, orgmode, and neorg.
MIT License
699 stars 28 forks source link

vim.treesitter.parse_query() error #50

Closed snelling-a closed 1 year ago

snelling-a commented 1 year ago

I've been getting this error on startup.

Screenshot 2023-03-25 at 12 38 44 PM

https://github.com/lukas-reineke/headlines.nvim/blob/6496b6229ce708253a906daed07067c1d32a427b/lua/headlines/init.lua#L6-L12

seems to be the issue.

I think the fix would be


    local ok, parsed_query = pcall(vim.treesitter.query.parse, language, query)