|
|
@ -7,26 +7,30 @@ function SetFZFoptions()
|
|
|
|
tunmap <buffer> <Esc>
|
|
|
|
tunmap <buffer> <Esc>
|
|
|
|
endfunction
|
|
|
|
endfunction
|
|
|
|
|
|
|
|
|
|
|
|
if exists('g:fzf_colors.bg')
|
|
|
|
let g:fzf_layout = { 'window': 'call FloatingFZF()' }
|
|
|
|
call remove(g:fzf_colors, 'bg')
|
|
|
|
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if stridx($FZF_DEFAULT_OPTS, '--border') == -1
|
|
|
|
|
|
|
|
let $FZF_DEFAULT_OPTS .= ' --border'
|
|
|
|
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function! FloatingFZF()
|
|
|
|
function! FloatingFZF()
|
|
|
|
let width = float2nr(&columns * 0.8)
|
|
|
|
let buf = nvim_create_buf(v:false, v:true)
|
|
|
|
let height = float2nr(&lines * 0.6)
|
|
|
|
call setbufvar(buf, '&signcolumn', 'no')
|
|
|
|
let opts = { 'relative': 'editor',
|
|
|
|
|
|
|
|
\ 'row': (&lines - height) / 2,
|
|
|
|
let height = float2nr(10)
|
|
|
|
\ 'col': (&columns - width) / 2,
|
|
|
|
let width = float2nr(80)
|
|
|
|
|
|
|
|
let horizontal = float2nr((&columns - width) / 2)
|
|
|
|
|
|
|
|
let vertical = 1
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
let opts = {
|
|
|
|
|
|
|
|
\ 'relative': 'editor',
|
|
|
|
|
|
|
|
\ 'row': vertical,
|
|
|
|
|
|
|
|
\ 'col': horizontal,
|
|
|
|
\ 'width': width,
|
|
|
|
\ 'width': width,
|
|
|
|
\ 'height': height }
|
|
|
|
\ 'height': height,
|
|
|
|
|
|
|
|
\ 'style': 'minimal'
|
|
|
|
|
|
|
|
\ }
|
|
|
|
|
|
|
|
|
|
|
|
call nvim_open_win(nvim_create_buf(v:false, v:true), v:true, opts)
|
|
|
|
call nvim_open_win(buf, v:true, opts)
|
|
|
|
endfunction
|
|
|
|
endfunction
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
" Looks
|
|
|
|
|
|
|
|
let $FZF_DEFAULT_OPTS=' --color=dark --color=fg:15,bg:-1,hl:1,fg+:#ffffff,bg+:0,hl+:1 --color=info:0,prompt:0,pointer:12,marker:4,spinner:11,header:-1 --layout=reverse --margin=1,4'
|
|
|
|
let g:fzf_layout = { 'window': 'call FloatingFZF()' }
|
|
|
|
let g:fzf_layout = { 'window': 'call FloatingFZF()' }
|
|
|
|
|
|
|
|
|
|
|
|
" Keybinds
|
|
|
|
" Keybinds
|
|
|
|