Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion autoload/LanguageClient.vim
Original file line number Diff line number Diff line change
Expand Up @@ -559,8 +559,19 @@ function! s:OpenHoverPreview(bufname, lines, filetype, ...) abort
" trigger refresh on plasticboy/vim-markdown
call win_execute(pop_win_id, 'doautocmd InsertLeave')
elseif display_approach ==# 'preview'
execute 'silent! noswapfile pedit!' a:bufname
let loc = s:GetVar('LanguageClient_PreviewWindowLoc', '')
let size = s:GetVar('LanguageClient_PreviewHeight', &previewheight)
let win_modifiers_from_loc = #{left: ["","vertical"], right: ["botright","vertical"], top:["",""], bottom: ["botright",""]}
if has_key(win_modifiers_from_loc, loc)
let win_modifiers = win_modifiers_from_loc[loc]
let [win_b, win_v] = win_modifiers
else
let win_b = ""
let win_v = ""
endif
execute 'silent! noswapfile' win_b win_v 'pedit!' a:bufname
wincmd P
execute 'silent!' win_v "resize" size
else
call s:Echoerr('Unknown display approach: ' . display_approach)
endif
Expand Down