Allow configuration of floating window appearance

Closes #807.
This commit is contained in:
Andy Stewart
2022-02-02 09:23:45 +00:00
parent e9871cf952
commit 384bf003f6
4 changed files with 47 additions and 16 deletions

View File

@@ -24,9 +24,22 @@ endfunction
let g:gitgutter_preview_win_location = get(g:, 'gitgutter_preview_win_location', 'bo')
if exists('*nvim_open_win')
let g:gitgutter_preview_win_floating = get(g:, 'gitgutter_preview_win_floating', 1)
let g:gitgutter_floating_window_options = get(g:, 'gitgutter_floating_window_options', {
\ 'relative': 'cursor',
\ 'row': 1,
\ 'col': 0,
\ 'width': 42,
\ 'height': &previewheight,
\ 'style': 'minimal'
\ })
else
let default = exists('&previewpopup') ? !empty(&previewpopup) : 0
let g:gitgutter_preview_win_floating = get(g:, 'gitgutter_preview_win_floating', default)
let g:gitgutter_floating_window_options = get(g:, 'gitgutter_floating_window_options', {
\ 'line': 'cursor+1',
\ 'col': 'cursor',
\ 'moved': 'any'
\ })
endif
let g:gitgutter_enabled = get(g:, 'gitgutter_enabled', 1)
if exists('*sign_unplace')