Skip to content

Conversation

ilan-schemoul
Copy link

Add options no_ignore, no_ignore_parent, hidden and follow

These four options are brought from the find_files finder of Telescope.
Default option for no_ignore is false therefore unlike the current behaviour
all files from .gitignore will be ignored (as it is always done with Telescope
and massively improve performance)

@danielfalk
Copy link
Owner

Apologies for the late response. I am reluctant to add a bunch of options for several reasons. It adds complexity, makes testing difficult due to all the different option combinations, it makes the docs more daunting, etc.

With that said, if the default rg options aren't suitable, I think it would be better just do have an extra_rg_args option. That way, users can override even more options if they need to and we won't have to keep propagating further options into this plugin.


For files not already in your history, smart-open uses ripgrep for scanning the current directory. (The command is roughly: `rg --files --glob-case-insensitive --hidden --ignore-file=<cwd>/.ff-ignore -g <ignore_patterns...>`).

As a result, files added to git, _but also ignored by git_, will not be included. While not common, this is something that git allows. If this becomes a problem you can work around it by either changing your git ignore patterns, editing the file in neovim in some other way, (thereby adding it to the history), or by using ripgrep's `.ignore` file for overriding git.
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

afaik, this is still a limitation. Ripgrep will not list a file that is added to git if it also matches a .gitignore pattern. (I believe git ls-files does the right thing here, and would list such files.)

@kuryart
Copy link

kuryart commented Jun 13, 2025

Apologies for the late response. I am reluctant to add a bunch of options for several reasons. It adds complexity, makes testing difficult due to all the different option combinations, it makes the docs more daunting, etc.

With that said, if the default rg options aren't suitable, I think it would be better just do have an extra_rg_args option. That way, users can override even more options if they need to and we won't have to keep propagating further options into this plugin.

I can create this extra_rg_args option, it would help me a lot, because I need to follow links. What do you think?

@kuryart kuryart mentioned this pull request Jun 13, 2025
These four options are brought from the find_files finder of Telescope.
Default option for no_ignore is false therefore unlike the current behaviour
all files from .gitignore will be ignored (as it is always done with Telescope
and massively improve performance)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants