ibhagwan / fzf-lua

Improved fzf.vim written in lua
MIT License
2.22k stars 144 forks source link

not working on macOS (find: -printf: unknown primary or operator) #564

Closed fegyi001 closed 1 year ago

fegyi001 commented 1 year ago

Info

fzf-lua configuration ```lua require('fzf-lua').setup({ }) ```

Description

I'm on Mac, and the fuzzy finder does not work at all. It cannot find the -printf option for find (it does not exist for find on Mac). I see the following screen:

find: -printf: unknown primary or operator

I use a basic setup of fzf-lua. I'm quite new to nvim.

Screenshot 2022-11-07 at 23 00 53
ibhagwan commented 1 year ago

It seems you don’t have rg or fd installed, in this case fzf-lua defaults to find and the default opts for fine use printf which requires GNU find.

Either install rg or fd or modify the default find options in setup:

check the below command works in your shell first

require('fzf-lua').setup({
files = { cmd = 'find -type f' }
})
fegyi001 commented 1 year ago

Wow, it works now. It is blazingly fast also for big projects (compared to Telescope), thanks a lot!

image
ibhagwan commented 1 year ago

Wow, it works now. It is blazingly fast also for big projects (compared to Telescope), thanks a lot!

Glad you like it, if you haven’t installed rg yet I highly recommend it, should boost up the performance of both files and grep providers, you can also disable file and git icons to squeeze a bit more performance if you wish.