ThePrimeagen/init.lua

<leader>ps not working with ripgrep

em2943 opened this issue · 3 comments

hey I installed ripgrep as said in the readme but <leader>ps still doesn't work.

now working

I'm just going to put this here in case anyone else encounters the issue I did that is similar to this one. If after installing ripgrep the <leader>ps keymap isn't working you can try troubleshooting with these steps:

  1. Run :checkhealth command in normal mode inside vim. Navigate down to telescope and see if you have any errors. For myself I had: ERROR rg: not found. live-grep finder will not function without [BurntSushi/ripgrep](https://github.com/BurntSushi/ripgrep) installed. This indicated that telescope couldn't find ripgrep even though it was installed.
  2. Run which rg in your terminal. Because I was able to execute commands like rg -i requires and get a response in my terminal, I had assumed that the ripgrep binary (rg) was already on my PATH. It wasn't until I tried which rg that I realized that it wasn't. I'm still not sure why, but when I installed ripgrep with homebrew my cellar isn't symlinked to 'usr/local/bin` so it wasn't added to PATH, but I was still able to execute it.
  3. Either way, the fix was to find the location of the binary by checking the output of my homebrew install ripgrep command and then add that to my my PATH in ~/.bash_profile. After that when I ran :checkhealth telescope had: OK plenary installed and when I executed <leader>ps with Grep > requires I was able to see files.

Hope this helps.

em2943 commented

thanks