mirror of
https://github.com/prabirshrestha/vim-lsp.git
synced 2025-12-14 20:35:59 +01:00
add new preview window id api (#1323)
* add new preview window id api resolves #1281 * add alias for getpreviewwinid() * add documentation
This commit is contained in:
@@ -1216,6 +1216,10 @@ function! lsp#get_progress() abort
|
||||
return lsp#internal#work_done_progress#get_progress()
|
||||
endfunction
|
||||
|
||||
function! lsp#document_hover_preview_winid() abort
|
||||
return lsp#internal#document_hover#under_cursor#getpreviewwinid()
|
||||
endfunction
|
||||
|
||||
"
|
||||
" Scroll vim-lsp related windows.
|
||||
"
|
||||
|
||||
@@ -74,6 +74,13 @@ function! lsp#internal#document_hover#under_cursor#do(options) abort
|
||||
\ )
|
||||
endfunction
|
||||
|
||||
function! lsp#internal#document_hover#under_cursor#getpreviewwinid() abort
|
||||
if exists('s:doc_win')
|
||||
return s:doc_win.get_winid()
|
||||
endif
|
||||
return v:null
|
||||
endfunction
|
||||
|
||||
function! s:show_hover(ui, server_name, request, response) abort
|
||||
if !has_key(a:response, 'result') || empty(a:response['result']) ||
|
||||
\ empty(a:response['result']['contents'])
|
||||
|
||||
Reference in New Issue
Block a user