vim.iter: flatten() non-list input #28448
Labels
complexity:low
Low-risk, self-contained. Do NOT ask "can I work on this", just read CONTRIBUTING.md
enhancement
feature request
lua
stdlib
needs:discussion
For PRs that propose significant changes to some part of the architecture or API
Milestone
Problem
iter:flatten() currently fails ("flatten() requires a list-like table") on this code from gen_lsp.lua:
neovim/scripts/gen_lsp.lua
Lines 262 to 265 in 35e3883
Expected behavior
tbl_flatten
accepted array-like input and the above gen_lsp code leveraged that to drop nil items.Can we enhance
Iter:flatten()
to work for arrays?The text was updated successfully, but these errors were encountered: