andreyorst / fzf.kak

FZF for Kakoune
MIT License
143 stars 33 forks source link

I can't make the grep and find commands ignore all the files that are in the gitignore. #78

Closed tryhardfifi closed 3 years ago

tryhardfifi commented 4 years ago

Hi! I am quite sure this is not an issue since it should be pretty simple to add the flag to ignore the files in the gitignore but I have tried many combinations with find, grep, ag and I can't seem to make it work... Essentially I was setting the commands from set-option global fzf_find_command and set-option global fzf_grep_command.

Thanks in advance. 😄

jtrees commented 3 years ago

set-option global fzf_grep_command rg does the trick for me.

andreyorst commented 3 years ago

@filipeisho, sorry for delay, somehow missed emails from GitHub!

You can tell find to ignore specific patterns with -o. I've did it automatically like this: https://github.com/andreyorst/dotfiles/blob/187ebb84f9542b76a4f3c3e08f9533cd8187faa1/.config/kak/plugins.kak#L66-L76

But, as @jtrees mentioned, it is better to use rg for grepping, and fd for file search, as they respect .gitignore by default.