mirror of
https://github.com/neovim/neovim.git
synced 2026-08-31 03:13:48 +00:00
refactor(treesitter)!: get_parser return nil on error #37276
This commit is contained in:
@@ -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 = {}
|
||||
|
||||
Reference in New Issue
Block a user