nvim-telescope / telescope-live-grep-args.nvim

Live grep with args
726 stars 40 forks source link

Deprecation warning for tbl_flatten #83

Open low613 opened 4 months ago

low613 commented 4 months ago

Description

It seems that vim.tbl_flatten is going to be deprecated in Nvim0.13 and I am now getting a deprecation warning for it

- WARNING vim.tbl_flatten is deprecated. Feature will be removed in Nvim 0.13
  - ADVICE:
    - use vim.iter(…):flatten():totable() instead.
    - stack traceback:
        /home/user/.local/share/nvim/lazy/telescope-live-grep-args.nvim/lua/telescope/_extensions/live_grep_args.lua:49
        /home/user/.local/share/nvim/lazy/telescope.nvim/lua/telescope/finders/async_job_finder.lua:12
        /home/userli/.local/share/nvim/lazy/telescope.nvim/lua/telescope/finders/async_job_finder.lua:34
        /home/user/.local/share/nvim/lazy/telescope.nvim/lua/telescope/pickers.lua:494
        [C]:-1
        /home/user/.local/share/nvim/lazy/telescope.nvim/lua/telescope/pickers.lua:493

Neovim version

NVIM v0.11.0-dev-292+g0e3e1e6b6
Build type: RelWithDebInfo
LuaJIT 2.1.1716656478

Operating system and version

Ubuntu 22.04

Telescope version / branch / rev

0.1.x a0bbec21143c7bc5f8bb02e0005fa0b982edc026

Telescope live grep args version / branch / rev

master 8ad632f793fd437865f99af5684f78300dac93fb

checkhealth telescope

==============================================================================
telescope: health#telescope#check

Checking for required plugins ~
- OK plenary installed.
- OK nvim-treesitter installed.

Checking external dependencies ~
- OK rg: found ripgrep 14.1.0
- OK fd: found fd 8.3.1

===== Installed extensions ===== ~

Telescope Extension: `file_browser` ~
- No healthcheck provided

Telescope Extension: `fzf` ~
- OK lib working as expected
- OK file_sorter correctly configured
- OK generic_sorter correctly configured

Telescope Extension: `live_grep_args` ~
- No healthcheck provided

Telescope Extension: `ui-select` ~
- No healthcheck provided

Telescope Extension: `undo` ~
- No healthcheck provided

Telescope Extension: `yaml_schema` ~
- No healthcheck provided

Steps to reproduce

  1. nvim
  2. run telescope live-grep-args
  3. observe `checkhealth vim.deprecated

Expected behavior

No response

Actual behavior

Deprecation Warning

Minimal config

vim.cmd [[set runtimepath=$VIMRUNTIME]]
vim.cmd [[set packpath=/tmp/nvim/site]]
local package_root = '/tmp/nvim/site/pack'
local install_path = package_root .. '/packer/start/packer.nvim'
local function load_plugins()
  require('packer').startup {
    {
      'wbthomason/packer.nvim',
      {
        'nvim-telescope/telescope.nvim',
        requires = {
          'nvim-lua/plenary.nvim',
          { 'nvim-telescope/telescope-fzf-native.nvim', run = 'make', },
          { 'nvim-telescope/telescope-live-grep-args.nvim', },
        },
      },
      -- ADD PLUGINS THAT ARE _NECESSARY_ FOR REPRODUCING THE ISSUE
    },
    config = {
      package_root = package_root,
      compile_path = install_path .. '/plugin/packer_compiled.lua',
      display = { non_interactive = true },
    },
  }
end
_G.load_config = function()
  require('telescope').setup()
  require('telescope').load_extension('fzf')
  require('telescope').load_extension('live_grep_args')
  -- ADD INIT.LUA SETTINGS THAT ARE _NECESSARY_ FOR REPRODUCING THE ISSUE
end
if vim.fn.isdirectory(install_path) == 0 then
  print("Installing Telescope and dependencies.")
  vim.fn.system { 'git', 'clone', '--depth=1', 'https://github.com/wbthomason/packer.nvim', install_path }
end
load_plugins()
require('packer').sync()
vim.cmd [[autocmd User PackerComplete ++once echo "Ready!" | lua load_config()]]