I'm just getting started with neovim, and had a tough time getting the Telescope plugin to start working correctly. I'm using packer as my plugin manager, and in my plugins.lua file, I had all the dependencies listed that Telescope needed, which looked like this:

return require('packer').startup(function()
  -- packer can run itself
  use 'wbthomason/packer.nvim'
  
  -- Telescope and it's dependencies
  use 'nvim-telescope/telescope.nvim'
  use 'nvim-lua/plenary.nvim'
  use 'nvim-treesitter/nvim-treesitter'
  use 'BurntSushi/ripgrep'
  use 'sharkdp/fd'
end)

After I ran :PackerSync it said that all of the packages were successfully installed. I also looked at my .local/share/nvim/site/pack/packer/start directory and saw all of the plugins were there.

But, after this when I ran :checkhealth Telescope I kept getting a warnings that ripgrep and fd were not installed and needed/recommended for Telescope to work properly. Telescope and nvim-treesitter both said they were installed, but not ripgrep and fd. This confused me for a long time, and the health check did not come back succesfull until I installed both ripgrep and fd using homebrew:

brew install ripgrep
brew install fd

So, my question is why did I need to install these two with homebrew, but for example I didn't need to homebrew install nvim-treesitter? I don't undertand what the difference is. Thank you so much for any help. Also, I am running on mac:

MacOS Bug Sur
Version 11.3.1
MacBook Pro (16-inch, 2019)
Processor: 2.3 GHz 8-Core Intel Core i9
Memory: 32 GB 2667 MHz DDR4
Startup Disk: Macintosh HD
Graphics: AMD Radeon Pro 5500M 8 GB
2

There are 2 best solutions below

0
On

Telescope depends on ripgrep for "ripgrep is a command line tool that searches your files for patterns that you give it".

ripgrep is not a neovim plugin. You should use package installer like brew to install it. fd is same as ripgrep.

I think Packer actually use git clone to install some plugins in default place .

0
On

In Telescope, ripgrep is the recommended and default tool for finding text in files (it is used for the live_grep and grep_string builtin pickers by default, so if you don't have ripgrep, these pickers will fail). Ripgrep is a grep alternative, and just like grep, it is a unix-style command-line utility which searches for text in files using regular strings or regular expressions (it is not a Neovim plugin). Telescope simply executes/invokes the ripgrep binary in the background whenever you use either of the 2 aforementioned pickers, therefore ripgrep must be installed and accessible from $PATH. Telescope may be configured to use any grep utility that you'd like to use; you do not need ripgrep. For more information, enter the command :help telescope.defaults.vimgrep_arguments in Neovim.