neovim/runtime/lua/vim
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
..
_meta feat(defaults): use ripgrep (rg) for 'grepprg' if available 2024-04-16 19:21:02 +02:00
filetype vim-patch:9.1.0354: runtime(uci): No support for uci file types (#28409) 2024-04-19 14:50:12 +08:00
func fix(treesitter): return correct match table in iter_captures() 2024-03-27 10:39:46 +00:00
lsp refactor(lua): deprecate tbl_flatten 2024-04-22 02:11:23 +02:00
provider refactor: rewrite ruby provider in lua 2024-01-24 19:26:53 +01:00
treesitter refactor(treesitter): language loading 2024-04-21 14:09:27 +01:00
ui/clipboard fix(osc52): use nvim_chan_send() to stderr for copying (#26690) 2023-12-21 11:47:04 +08:00
_comment.lua feat(comment): add built-in commenting 2024-04-05 18:07:43 +02:00
_defaults.lua feat(defaults): use ripgrep (rg) for 'grepprg' if available 2024-04-16 19:21:02 +02:00
_editor.lua feat(lua): enable(enable:boolean, filter:table) #28374 2024-04-18 07:57:58 -07:00
_init_packages.lua refactor(types): more fixes 2024-03-06 10:45:22 +00:00
_inspector.lua docs: support inline markdown 2024-03-09 11:21:55 +00:00
_meta.lua refactor(lsp): resolve the config-client entanglement 2024-02-13 14:49:20 +00:00
_options.lua refactor(lua): rename tbl_islist => islist 2024-04-21 17:08:07 +02:00
_system.lua fix(vim.ui): open() may wait indefinitely #28325 2024-04-15 04:33:09 -07:00
_watch.lua fix: move fswatch linux check inside of vim.schedule (#27824) 2024-03-12 15:15:55 +08:00
diagnostic.lua refactor(lua): rename tbl_islist => islist 2024-04-21 17:08:07 +02:00
F.lua fix(diagnostic): typing 2024-01-16 09:33:10 +00:00
filetype.lua vim-patch:9.1.0355: filetype: flake.lock files are not recognized 2024-04-19 16:09:41 +02:00
fs.lua feat(lua): vim.fs.normalize() resolves ".", ".." #28203 2024-04-16 12:13:44 -07:00
func.lua fix(treesitter): return correct match table in iter_captures() 2024-03-27 10:39:46 +00:00
glob.lua refactor(lua): refactored glob 2024-01-19 11:54:04 +00:00
health.lua refactor(lua): deprecate tbl_flatten 2024-04-22 02:11:23 +02:00
highlight.lua refactor(lua): type annotations 2024-03-16 19:26:10 +00:00
inspect.lua fix(inspect): escape identifiers that are lua keywords (#19898) 2022-08-23 13:02:55 +02:00
iter.lua refactor(vim.iter)!: remove vim.iter.map/filter/totable #26138 2024-04-19 06:22:41 -07:00
keymap.lua refactor(lua): type annotations 2024-03-16 19:26:10 +00:00
loader.lua refactor(types): more fixes 2024-03-06 10:45:22 +00:00
lsp.lua feat(lsp): add vim.lsp.buf.subtypes(), vim.lsp.buf.supertypes() (#28388) 2024-04-20 15:40:01 +02:00
provider.lua refactor: create function for deferred loading 2024-02-03 16:53:41 +01:00
re.lua docs: auto-generate docs for vim.lpeg and vim.re 2024-01-14 11:08:33 +00:00
secure.lua refactor(lua): type annotations 2024-03-16 19:26:10 +00:00
shared.lua refactor(lua): deprecate tbl_flatten 2024-04-22 02:11:23 +02:00
snippet.lua refactor(lua): type annotations 2024-03-16 19:26:10 +00:00
termcap.lua refactor(lua): type annotations 2024-03-16 19:26:10 +00:00
text.lua refactor(lua): type annotations 2024-03-16 19:26:10 +00:00
treesitter.lua docs: support inline markdown 2024-03-09 11:21:55 +00:00
ui.lua fix(vim.ui.open): try wslview before explorer.exe #28424 2024-04-20 05:47:08 -07:00
uri.lua fix(lua): remove uri fragment from file paths (#27647) 2024-02-28 10:50:53 +01:00
version.lua docs: support inline markdown 2024-03-09 11:21:55 +00:00
vimhelp.lua docs: apply current colorscheme to default highlight groups 2023-12-20 18:58:40 +01:00