diff --git a/.config/ripgrep/config b/.config/ripgrep/config new file mode 100644 index 0000000..a7f4c7c --- /dev/null +++ b/.config/ripgrep/config @@ -0,0 +1 @@ +--hidden diff --git a/.config/vim/vimrc.d/20-plugins.vim b/.config/vim/vimrc.d/20-plugins.vim index be6044c..29d59f8 100644 --- a/.config/vim/vimrc.d/20-plugins.vim +++ b/.config/vim/vimrc.d/20-plugins.vim @@ -32,9 +32,10 @@ if (exists("g:loaded_tmux_navigator")) endif if (get(g:, 'loaded_fzf')) - " Redefine :Rg to include hidden files (except for .git) + " Redefine :Rg to ignore the .git directory + " See fzf.vim/plugin/fzf.vim for the original definition command! -bang -nargs=* Rg \ call fzf#vim#grep( - \ 'rg --column --line-number --no-heading --color=always --smart-case --hidden -g "!.git" -- '.shellescape(), 1, + \ 'rg --column --line-number --no-heading --color=always --smart-case -g "!.git" -- '.shellescape(), 1, \ fzf#vim#with_preview(), 0) endif diff --git a/.config/zsh/.zprofile b/.config/zsh/.zprofile index 1dedde6..1439e37 100644 --- a/.config/zsh/.zprofile +++ b/.config/zsh/.zprofile @@ -20,6 +20,7 @@ export JUPYTER_CONFIG_DIR="$XDG_CONFIG_HOME"/jupyter export PYLINTHOME="${XDG_CACHE_HOME}"/pylint export PYTHONSTARTUP="${XDG_CONFIG_HOME}"/python/pythonrc export MBSYNCRC="$XDG_CONFIG_HOME"/isync/mbsyncrc +export RIPGREP_CONFIG_PATH="$XDG_CONFIG_HOME"/ripgrep/config export HISTFILE="$XDG_DATA_HOME"/bash/history export LESSHISTFILE=/dev/null @@ -106,7 +107,7 @@ export FZF_DEFAULT_COMMAND_NO_RG if (( $+commands[rg] )); then # Prune `.git/` and everything ignored by gitignore(5) - FZF_DEFAULT_COMMAND="rg -L --hidden --files -g '!.git'" + FZF_DEFAULT_COMMAND="rg -L --files -g '!.git'" else # Fallback to hardcoding the most important paths to prune FZF_DEFAULT_COMMAND="$FZF_DEFAULT_COMMAND_NO_RG"