fix(treesitter): return correct match table in iter_captures()

This commit is contained in:
Lewis Russell
2024-03-25 22:06:31 +00:00
committed by Lewis Russell
parent c4e1930851
commit 7d97150084
7 changed files with 123 additions and 34 deletions

View File

@@ -281,8 +281,8 @@ local function filter_decl(line)
-- M.fun = vim._memoize(function(...)
-- ->
-- function M.fun(...)
line = line:gsub('^local (.+) = .*_memoize%([^,]+, function%((.*)%)$', 'local function %1(%2)')
line = line:gsub('^(.+) = .*_memoize%([^,]+, function%((.*)%)$', 'function %1(%2)')
line = line:gsub('^local (.+) = memoize%([^,]+, function%((.*)%)$', 'local function %1(%2)')
line = line:gsub('^(.+) = memoize%([^,]+, function%((.*)%)$', 'function %1(%2)')
return line
end