refactor(treesitter)!: get_parser return nil on error #37276

This commit is contained in:
nikolightsaber
2026-03-13 20:57:36 +01:00
committed by GitHub
parent 8499af1119
commit fd1e019e90
13 changed files with 35 additions and 49 deletions

View File

@@ -54,7 +54,7 @@ local get_headings = function(bufnr)
if not lang then
return {}
end
local parser = assert(ts.get_parser(bufnr, lang, { error = false }))
local parser = assert(ts.get_parser(bufnr, lang))
local query = ts.query.parse(lang, heading_queries[lang])
local root = parser:parse()[1]:root()
local headings = {}