[nvim] Fix fzf cmd & coloring
Fix various little fzf annoyances: Implement good coloring of floating window. Make it use fd by default, search through hidden files but ignore the git directory itself. Also, let it split the window on s and vertical split on v.
This commit is contained in:
parent
a390d14390
commit
4010b3ffc1
1 changed files with 6 additions and 5 deletions
|
@ -8,10 +8,10 @@ let g:fzf_command_prefix = 'Fzf'
|
||||||
let g:fzf_colors =
|
let g:fzf_colors =
|
||||||
\ { 'fg': ['fg', 'Normal'],
|
\ { 'fg': ['fg', 'Normal'],
|
||||||
\ 'bg': ['bg', 'Normal'],
|
\ 'bg': ['bg', 'Normal'],
|
||||||
|
\ 'gutter': ['bg', 'Normal'],
|
||||||
\ 'hl': ['fg', 'Comment'],
|
\ 'hl': ['fg', 'Comment'],
|
||||||
\ 'fg+': ['fg', 'CursorLine', 'CursorColumn', 'Normal'],
|
\ 'fg+': ['fg', 'CursorLine', 'CursorColumn', 'Normal'],
|
||||||
\ 'bg+': ['bg', 'CursorLine', 'CursorColumn'],
|
\ 'bg+': ['bg', 'Normal', 'CursorColumn'],
|
||||||
\ 'gutter': ['bg', 'Normal'],
|
|
||||||
\ 'hl+': ['fg', 'Statement'],
|
\ 'hl+': ['fg', 'Statement'],
|
||||||
\ 'info': ['fg', 'PreProc'],
|
\ 'info': ['fg', 'PreProc'],
|
||||||
\ 'border': ['fg', 'Ignore'],
|
\ 'border': ['fg', 'Ignore'],
|
||||||
|
@ -20,10 +20,10 @@ let g:fzf_colors =
|
||||||
\ 'marker': ['fg', 'Keyword'],
|
\ 'marker': ['fg', 'Keyword'],
|
||||||
\ 'spinner': ['fg', 'Label'],
|
\ 'spinner': ['fg', 'Label'],
|
||||||
\ 'header': ['fg', 'Comment'] }
|
\ 'header': ['fg', 'Comment'] }
|
||||||
" add some additional actions TODO perhaps unify with NerdTree mappings
|
|
||||||
let g:fzf_action = {
|
let g:fzf_action = {
|
||||||
\ 'ctrl-t': 'tab split',
|
\ 'ctrl-t': 'tab split',
|
||||||
\ 'ctrl-x': 'split',
|
\ 'ctrl-s': 'split',
|
||||||
\ 'ctrl-v': 'vsplit' }
|
\ 'ctrl-v': 'vsplit' }
|
||||||
|
|
||||||
" FzfRg but also search through hidden files
|
" FzfRg but also search through hidden files
|
||||||
|
@ -34,7 +34,8 @@ command! -bang -nargs=* FzfRgHidden
|
||||||
|
|
||||||
" make fzf use the nvim floating window globally. (weee, technology!)
|
" make fzf use the nvim floating window globally. (weee, technology!)
|
||||||
"
|
"
|
||||||
let $FZF_DEFAULT_OPTS="--layout=reverse "
|
let $FZF_DEFAULT_OPTS="--layout=reverse --ansi"
|
||||||
|
let $FZF_DEFAULT_COMMAND="fd --type f --hidden --color=always -E '.git/'"
|
||||||
" to use fzf in a floating window only conditionally, the best approach would
|
" to use fzf in a floating window only conditionally, the best approach would
|
||||||
" every command we want to floatize
|
" every command we want to floatize
|
||||||
if has('nvim-0.4.0') || has("patch-8.2.0191")
|
if has('nvim-0.4.0') || has("patch-8.2.0191")
|
||||||
|
|
Loading…
Reference in a new issue