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

Live grep with args
727 stars 40 forks source link

E5108: Error executing lua: ...p-args.nvim/lua/telescope/_extensions/live_grep_args.lua:56: attempt to call a nil value #36

Closed stephane-klein closed 2 years ago

stephane-klein commented 2 years ago

Hello,

Since few days, I have this error:

E5108: Error executing lua: ...p-args.nvim/lua/telescope/_extensions/live_grep_args.lua:56: attempt to call a nil value
stack traceback:
        ...p-args.nvim/lua/telescope/_extensions/live_grep_args.lua:56: in function 'picker'
        /Users/stephaneklein/.config/nvim/lua/_telescope.lua:158: in function </Users/stephaneklein/.config/nvim/lua/_telescope.lua:158>

Here is the error line in my configuration: https://github.com/stephane-klein/dotfiles/blob/079e4e70307fa7aa24c2af9e602d04439d05c3f2/dot_config/nvim/lua/_telescope.lua#L158

Do you have any idea where the problem might be coming from?

Best regards,
Stéphane

stephane-klein commented 2 years ago

If I replace:

vim.keymap.set(
    'n', '<leader>/',
    use_layout(telescope.extensions.live_grep_args.live_grep_args, 'popup_list'),
    { noremap = true, desc = "Live ripgrep"}
)

by:

vim.keymap.set(
    'n', '<leader>/',
    telescope.extensions.live_grep_args.live_grep_args,
    { noremap = true, desc = "Live ripgrep"}
)

The bug is fixed.

weeman1337 commented 2 years ago

Hi @stephane-klein thanks for reporting the issue. It has been introduced by #10 . Changing the config doesn't fix bugs or issues :)

I will commit an update shortly.

weeman1337 commented 2 years ago

@stephane-klein can you give #37 a try?

You can set the improve-theme-support branch in your packer config.

stephane-klein commented 2 years ago

@weeman1337 thinks, it works :+1:

My config is fixed by https://github.com/stephane-klein/dotfiles/commit/ef7eadce1f043efa0526cced162aa43e80c19a9d