feat(lua): add vim.iter (#23029)

vim.iter wraps a table or iterator function into an `Iter` object with
methods such as `filter`, `map`, and `fold` which can be chained to
produce iterator pipelines that do not create new tables at each step.
This commit is contained in:
Gregory Anders
2023-04-17 12:54:19 -06:00
committed by GitHub
parent 6cc76011ca
commit ab1edecfb7
6 changed files with 1812 additions and 1 deletions

View File

@ -154,8 +154,10 @@ CONFIG = {
'fs.lua',
'secure.lua',
'version.lua',
'iter.lua',
],
'files': [
'runtime/lua/vim/iter.lua',
'runtime/lua/vim/_editor.lua',
'runtime/lua/vim/shared.lua',
'runtime/lua/vim/loader.lua',
@ -185,6 +187,8 @@ CONFIG = {
'fn_helptag_fmt': lambda fstem, name: (
f'*vim.{name}()*'
if fstem.lower() == '_editor'
else f'*{name}()*'
if fstem in ('iter.lua')
else f'*{fstem}.{name}()*'),
'module_override': {
# `shared` functions are exposed on the `vim` module.