nvim: Remove custom floating window function
Signed-off-by: Sanchayan Maity <maitysanchayan@gmail.com>
This commit is contained in:
parent
bc64f3240f
commit
d123b038b3
1 changed files with 1 additions and 25 deletions
|
@ -665,7 +665,7 @@ let g:lisp_rainbow=1
|
|||
" FZF
|
||||
let g:fzf_mru_no_sort = 1
|
||||
let $FZF_DEFAULT_OPTS='--layout=reverse'
|
||||
let g:fzf_layout = { 'window': 'call CreateCentredFloatingWindow()' }
|
||||
let g:fzf_layout = { 'window': { 'width': 0.8, 'height': 0.6 } }
|
||||
|
||||
" Quickr
|
||||
let g:quickr_cscope_keymaps = 0
|
||||
|
@ -732,30 +732,6 @@ function! NvimGdbNoTKeymaps()
|
|||
tnoremap <silent> <buffer> <Esc> <C-\><C-n>
|
||||
endfunction
|
||||
|
||||
" Stolen from https://github.com/camspiers/dotfiles/blob/master/files/.config/nvim/init.vim
|
||||
function! CreateCentredFloatingWindow()
|
||||
let width = float2nr(&columns * 0.8)
|
||||
let height = float2nr(&lines * 0.6)
|
||||
let top = ((&lines - height) / 2) - 1
|
||||
let left = (&columns - width) / 2
|
||||
let opts = {'relative': 'editor', 'row': top, 'col': left, 'width': width, 'height': height, 'style': 'minimal'}
|
||||
|
||||
let top = "╭" . repeat("─", width - 2) . "╮"
|
||||
let mid = "│" . repeat(" ", width - 2) . "│"
|
||||
let bot = "╰" . repeat("─", width - 2) . "╯"
|
||||
let lines = [top] + repeat([mid], height - 2) + [bot]
|
||||
let s:buf = nvim_create_buf(v:false, v:true)
|
||||
call nvim_buf_set_lines(s:buf, 0, -1, v:true, lines)
|
||||
call nvim_open_win(s:buf, v:true, opts)
|
||||
set winhl=Normal:Floating
|
||||
let opts.row += 1
|
||||
let opts.height -= 2
|
||||
let opts.col += 2
|
||||
let opts.width -= 4
|
||||
call nvim_open_win(nvim_create_buf(v:false, v:true), v:true, opts)
|
||||
au BufWipeout <buffer> exe 'bw '.s:buf
|
||||
endfunction
|
||||
|
||||
function! s:incsearch_config(...) abort
|
||||
return incsearch#util#deepextend(deepcopy({
|
||||
\ 'modules': [incsearch#config#easymotion#module({'overwin': 1})],
|
||||
|
|
Loading…
Reference in a new issue