nvim-telescope / telescope-media-files.nvim

Telescope extension to preview media files using Ueberzug.
MIT License
445 stars 46 forks source link

Not working with ripgrep, getting "fd: Executable not found" but `rg` is working #24

Open mohityadav7 opened 2 years ago

mohityadav7 commented 2 years ago

I have ripgrep installed. And rg command is working in the shell. I'm using Ubuntu via WSL on Windows.

The prerequisites mention that one of fd, rg, find, or fdfind should be working.

fd / rg / find or fdfind in Ubuntu/Debian.

I'm using the configuration from the readme:

extensions = {
    media_files = {
      -- filetypes whitelist
      -- defaults to {"png", "jpg", "mp4", "webm", "pdf"}
      filetypes = {"png", "webp", "jpg", "jpeg"},
      find_cmd = "rg" -- find command (defaults to `fd`)
    }
  },

I'm getting this error message:

[telescope] [WARN  22:51:46] ...ck/packer/start/telescope.nvim/lua/telescope/pickers.lua:473: Finder failed with msg:  ...ite/pack/packer/start/telescope.nvim/lua/telescope/_.lua:295: fd: Executable not found
[telescope] stack traceback:
[telescope] ^I...ite/pack/packer/start/telescope.nvim/lua/telescope/_.lua:295: in function 'convert_opts'
[telescope] ^I...ite/pack/packer/start/telescope.nvim/lua/telescope/_.lua:17: in function 'new'
[telescope] ^I...ite/pack/packer/start/telescope.nvim/lua/telescope/_.lua:64: in function 'spawn'
[telescope] ^I...cope.nvim/lua/telescope/finders/async_oneshot_finder.lua:46: in function 'finder'
[telescope] ^I...ck/packer/start/telescope.nvim/lua/telescope/pickers.lua:469: in function <...ck/packer/start/telescope.nvim/lua/telescope/pickers.lua:468>
[telescope] ^I[C]: in function 'pcall'
[telescope] ^I...ck/packer/start/telescope.nvim/lua/telescope/pickers.lua:468: in function <...ck/packer/start/telescope.nvim/lua/telescope/pickers.lua:416>

Update: I'm getting the same error message after installing fd. fdfind command is working in shell. Also, I've aliased fd to fdfind. But no luck.

perseoGI commented 2 years ago

Same problem here. It seems that find_cmd option is not setting the command correctly. At the end I had to install fd...

mattbrowley commented 2 years ago

This seems like the same issue as: https://github.com/nvim-telescope/telescope-media-files.nvim/issues/11 Setting an alternative find command in configuration files doesn't seem to work, and it always reverts to the fd default. That thread explains how to edit the plugin's media_files.lua file to use rg or fdfind by default instead of fd.