Fix #3266 - Truncate hover messages for LSP too

This commit is contained in:
w0rp 2020-08-05 13:46:08 +01:00
parent 1bd7b3e4ad
commit fa3a927ca3
No known key found for this signature in database
GPG key ID: 0FC1ECAA8C81CD83

View file

@ -105,6 +105,8 @@ function! ale#hover#HandleLSPResponse(conn_id, response) abort
\&& exists('*balloon_show') \&& exists('*balloon_show')
\&& ale#Var(l:options.buffer, 'set_balloons') \&& ale#Var(l:options.buffer, 'set_balloons')
call balloon_show(l:str) call balloon_show(l:str)
elseif get(l:options, 'truncated_echo', 0)
call ale#cursor#TruncatedEcho(split(a:response.body.displayString, "\n")[0])
elseif g:ale_hover_to_preview elseif g:ale_hover_to_preview
call ale#preview#Show(split(l:str, "\n"), { call ale#preview#Show(split(l:str, "\n"), {
\ 'filetype': 'ale-preview.message', \ 'filetype': 'ale-preview.message',