ripgrep: Add --hidden by default
This commit is contained in:
1
.config/ripgrep/config
Normal file
1
.config/ripgrep/config
Normal file
@@ -0,0 +1 @@
|
|||||||
|
--hidden
|
||||||
@@ -32,9 +32,10 @@ if (exists("g:loaded_tmux_navigator"))
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
if (get(g:, 'loaded_fzf'))
|
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
|
command! -bang -nargs=* Rg
|
||||||
\ call fzf#vim#grep(
|
\ call fzf#vim#grep(
|
||||||
\ 'rg --column --line-number --no-heading --color=always --smart-case --hidden -g "!.git" -- '.shellescape(<q-args>), 1,
|
\ 'rg --column --line-number --no-heading --color=always --smart-case -g "!.git" -- '.shellescape(<q-args>), 1,
|
||||||
\ fzf#vim#with_preview(), <bang>0)
|
\ fzf#vim#with_preview(), <bang>0)
|
||||||
endif
|
endif
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ export JUPYTER_CONFIG_DIR="$XDG_CONFIG_HOME"/jupyter
|
|||||||
export PYLINTHOME="${XDG_CACHE_HOME}"/pylint
|
export PYLINTHOME="${XDG_CACHE_HOME}"/pylint
|
||||||
export PYTHONSTARTUP="${XDG_CONFIG_HOME}"/python/pythonrc
|
export PYTHONSTARTUP="${XDG_CONFIG_HOME}"/python/pythonrc
|
||||||
export MBSYNCRC="$XDG_CONFIG_HOME"/isync/mbsyncrc
|
export MBSYNCRC="$XDG_CONFIG_HOME"/isync/mbsyncrc
|
||||||
|
export RIPGREP_CONFIG_PATH="$XDG_CONFIG_HOME"/ripgrep/config
|
||||||
|
|
||||||
export HISTFILE="$XDG_DATA_HOME"/bash/history
|
export HISTFILE="$XDG_DATA_HOME"/bash/history
|
||||||
export LESSHISTFILE=/dev/null
|
export LESSHISTFILE=/dev/null
|
||||||
@@ -106,7 +107,7 @@ export FZF_DEFAULT_COMMAND_NO_RG
|
|||||||
|
|
||||||
if (( $+commands[rg] )); then
|
if (( $+commands[rg] )); then
|
||||||
# Prune `.git/` and everything ignored by gitignore(5)
|
# 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
|
else
|
||||||
# Fallback to hardcoding the most important paths to prune
|
# Fallback to hardcoding the most important paths to prune
|
||||||
FZF_DEFAULT_COMMAND="$FZF_DEFAULT_COMMAND_NO_RG"
|
FZF_DEFAULT_COMMAND="$FZF_DEFAULT_COMMAND_NO_RG"
|
||||||
|
|||||||
Reference in New Issue
Block a user