Do not echo messages to the echo line for mouse movements unless the user says so
This commit is contained in:
parent
3a3c244723
commit
d8d13ef264
2 changed files with 25 additions and 2 deletions
|
@ -15,10 +15,18 @@ function! ale#balloon#MessageForPos(bufnr, lnum, col) abort
|
||||||
" Show the diagnostics message if found, 'Hover' output otherwise
|
" Show the diagnostics message if found, 'Hover' output otherwise
|
||||||
if l:index >= 0
|
if l:index >= 0
|
||||||
return l:loclist[l:index].text
|
return l:loclist[l:index].text
|
||||||
else
|
elseif exists('*balloon_show') || getbufvar(
|
||||||
|
\ a:bufnr,
|
||||||
|
\ 'ale_set_balloons_legacy_echo',
|
||||||
|
\ get(g:, 'ale_set_balloons_legacy_echo', 0)
|
||||||
|
\)
|
||||||
|
" Request LSP/tsserver hover information, but only if this version of
|
||||||
|
" Vim supports the balloon_show function, or if we turned a legacy
|
||||||
|
" setting on.
|
||||||
call ale#hover#Show(a:bufnr, a:lnum, a:col, {'called_from_balloonexpr': 1})
|
call ale#hover#Show(a:bufnr, a:lnum, a:col, {'called_from_balloonexpr': 1})
|
||||||
return ''
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
return ''
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! ale#balloon#Expr() abort
|
function! ale#balloon#Expr() abort
|
||||||
|
|
15
doc/ale.txt
15
doc/ale.txt
|
@ -1363,6 +1363,21 @@ g:ale_set_balloons *g:ale_set_balloons*
|
||||||
globally.
|
globally.
|
||||||
|
|
||||||
|
|
||||||
|
g:ale_set_balloons_legacy_echo *g:ale_set_balloons_legacy_echo*
|
||||||
|
*b:ale_set_balloons_legacy_echo*
|
||||||
|
Type: |Number|
|
||||||
|
Default: undefined
|
||||||
|
|
||||||
|
If set to `1`, moving your mouse over documents in Vim will make ALE ask
|
||||||
|
`tsserver` or `LSP` servers for information about the symbol where the mouse
|
||||||
|
cursor is, and print that information into Vim's echo line. This is an
|
||||||
|
option for supporting older versions of Vim which do not properly support
|
||||||
|
balloons in an asynchronous manner.
|
||||||
|
|
||||||
|
If your version of Vim supports the |balloon_show| function, then this
|
||||||
|
option does nothing meaningful.
|
||||||
|
|
||||||
|
|
||||||
g:ale_set_highlights *g:ale_set_highlights*
|
g:ale_set_highlights *g:ale_set_highlights*
|
||||||
|
|
||||||
Type: |Number|
|
Type: |Number|
|
||||||
|
|
Reference in a new issue