You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I can't use project commands like :FzfPreviewProjectFiles and :FzfPreviewProjectMruFiles on non-git repos, even when I use ripgrep, which should make fzf-preview not require git.
Expected
That I can use project commands like :FzfPreviewProjectFiles and :FzfPreviewProjectMruFiles in non-git repo directories.
Proposed solution
So when you have ripgrep installed, the g:fzf_preview_filelist_command, which is used to get the file list from project, uses ripgrep instead of git. Also, you can overwrite g:fzf_preview_filelist_command to any kind of command. So we should not decide for the user whether they are allowed to use the project commands, just because we're not in a git repo.
If I remove this check on whether it's a git repo in these commands:
@GiuseppeMP well there is no FzfPreviewDirectoryMruFiles, only FzfPreviewProjectMruFiles. I also point this out in #313. So if there would be a FzfPreviewDirectoryMruFiles command, then the project commands would maybe not even be necessary anymore, because we could consider every directory a project. This is of course only in the case ripgrep is installed, because only ripgrep is faster than git grep.
Problems summary
I can't use project commands like
:FzfPreviewProjectFiles
and:FzfPreviewProjectMruFiles
on non-git repos, even when I use ripgrep, which should make fzf-preview not require git.Expected
That I can use project commands like
:FzfPreviewProjectFiles
and:FzfPreviewProjectMruFiles
in non-git repo directories.Proposed solution
So when you have ripgrep installed, the
g:fzf_preview_filelist_command
, which is used to get the file list from project, uses ripgrep instead of git. Also, you can overwriteg:fzf_preview_filelist_command
to any kind of command. So we should not decide for the user whether they are allowed to use the project commands, just because we're not in a git repo.If I remove this check on whether it's a git repo in these commands:
https://github.com/yuki-yano/fzf-preview.vim/blob/main/src/fzf/resource/project-files.ts#L8-L10
https://github.com/yuki-yano/fzf-preview.vim/blob/main/src/fzf/resource/project-mru.ts#L13-L15
It seems to fix the issue. I can make a PR for this if approved.
The text was updated successfully, but these errors were encountered: