neovim/runtime
Justin M. Keyes 9912a4c81b refactor(lua): deprecate tbl_flatten
Problem:
Besides being redundant with vim.iter():flatten(), `tbl_flatten` has
these problems:

- Has `tbl_` prefix but only accepts lists.
- Discards some results! Compare the following:
  - iter.flatten():
    ```
    vim.iter({1, { { a = 2 } }, { 3 } }):flatten():totable()
    ```
  - tbl_flatten:
    ```
    vim.tbl_flatten({1, { { a = 2 } }, { 3 } })
    ```

Solution:
Deprecate tbl_flatten.

Note:
iter:flatten() currently fails ("flatten() requires a list-like table")
on this code from gen_lsp.lua:

    local anonym = vim.iter({ -- remove nil
      anonymous_num > 1 and '' or nil,
      '---@class ' .. anonymous_classname,
    }):flatten():totable()

Should we enhance :flatten() to work for arrays?
2024-04-22 02:11:23 +02:00
..
autoload vim-patch:08d2401fbc6d 2024-04-04 10:29:58 +02:00
colors fix(treesitter): document more standard highlight groups 2024-03-19 09:41:16 +01:00
compiler vim-patch:8a31de6dd275 (#28361) 2024-04-16 09:33:51 +08:00
doc refactor(lua): deprecate tbl_flatten 2024-04-22 02:11:23 +02:00
ftplugin vim-patch:d3ff129ce8c6 2024-04-22 00:18:34 +02:00
indent vim-patch:d3ff129ce8c6 2024-04-22 00:18:34 +02:00
keymap
lua refactor(lua): deprecate tbl_flatten 2024-04-22 02:11:23 +02:00
macros vim-patch:79230f027a25 2024-02-16 08:57:45 +01:00
pack/dist/opt vim-patch:d3c0ff5d5a90 2024-03-24 10:32:07 +01:00
plugin feat(defaults): add :Inspect to right-click menu (#28181) 2024-04-05 18:08:54 +08:00
queries fix(treesitter): update parsers and queries 2024-04-05 18:36:17 +02:00
spell
syntax vim-patch:d3ff129ce8c6 2024-04-22 00:18:34 +02:00
tools
tutor docs: fix typos (#27868) 2024-03-28 09:32:32 +08:00
CMakeLists.txt build: various fixes 2024-02-01 12:06:55 +01:00
delmenu.vim
filetype.lua fix(filetype): use unexpanded file name (#27931) 2024-03-23 11:46:23 +08:00
ftoff.vim
ftplugin.vim
ftplugof.vim
indent.vim
indoff.vim
macmap.vim
makemenu.vim vim-patch:9.1.0013: Modula2 filetype support lacking (#27020) 2024-01-16 17:45:57 +00:00
menu.vim
mswin.vim vim-patch:45da32964d6e 2024-03-14 15:04:31 +08:00
neovim.ico
nvim.appdata.xml
nvim.desktop
nvim.png
optwin.vim vim-patch:9.1.0147: Cannot keep a buffer focused in a window 2024-03-11 11:38:13 +08:00
synmenu.vim vim-patch:9.1.0013: Modula2 filetype support lacking (#27020) 2024-01-16 17:45:57 +00:00