summaryrefslogtreecommitdiff
path: root/autoload
diff options
context:
space:
mode:
Diffstat (limited to 'autoload')
-rw-r--r--autoload/ale/hover.vim10
1 files changed, 10 insertions, 0 deletions
diff --git a/autoload/ale/hover.vim b/autoload/ale/hover.vim
index 2af35aa4..8fdd288c 100644
--- a/autoload/ale/hover.vim
+++ b/autoload/ale/hover.vim
@@ -42,6 +42,11 @@ function! ale#hover#HandleTSServerResponse(conn_id, response) abort
\&& exists('*balloon_show')
\&& ale#Var(l:options.buffer, 'set_balloons')
call balloon_show(a:response.body.displayString)
+ elseif g:ale_hover_to_preview
+ call ale#preview#Show(split(a:response.body.displayString, "\n"), {
+ \ 'filetype': 'ale-preview.message',
+ \ 'stay_here': 1,
+ \})
else
call ale#util#ShowMessage(a:response.body.displayString)
endif
@@ -98,6 +103,11 @@ function! ale#hover#HandleLSPResponse(conn_id, response) abort
\&& exists('*balloon_show')
\&& ale#Var(l:options.buffer, 'set_balloons')
call balloon_show(l:str)
+ elseif g:ale_hover_to_preview
+ call ale#preview#Show(split(l:str, "\n"), {
+ \ 'filetype': 'ale-preview.message',
+ \ 'stay_here': 1,
+ \})
else
call ale#util#ShowMessage(l:str)
endif