summaryrefslogtreecommitdiff
path: root/autoload
diff options
context:
space:
mode:
authorw0rp <devw0rp@gmail.com>2018-05-17 16:23:29 +0100
committerw0rp <devw0rp@gmail.com>2018-05-17 16:23:29 +0100
commitd8d13ef264340113b74a3310a203416f2916b2f5 (patch)
tree78b945e88c23725140dfbc99fbebef21f063cf1d /autoload
parent3a3c24472361f4a7567500b63e9122bfcd5eb252 (diff)
downloadale-d8d13ef264340113b74a3310a203416f2916b2f5.zip
Do not echo messages to the echo line for mouse movements unless the user says so
Diffstat (limited to 'autoload')
-rw-r--r--autoload/ale/balloon.vim12
1 files changed, 10 insertions, 2 deletions
diff --git a/autoload/ale/balloon.vim b/autoload/ale/balloon.vim
index d36dd4f5..d49dcbf9 100644
--- a/autoload/ale/balloon.vim
+++ b/autoload/ale/balloon.vim
@@ -15,10 +15,18 @@ function! ale#balloon#MessageForPos(bufnr, lnum, col) abort
" Show the diagnostics message if found, 'Hover' output otherwise
if l:index >= 0
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})
- return ''
endif
+
+ return ''
endfunction
function! ale#balloon#Expr() abort