Running currently the latest Vim (8.0.1322).
I have +balloon_eval_term
and I have set balloonevalterm
.
To my understanding, :call balloon_show(bufname('%'))
should show a balloon in my terminal displaying the current buffer name. Yet, nothing is shown.
If I do :echo balloon_show(bufname('%'))' it echos
0` to the command line, which I assume is expected.
For completeness:
:version
VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Nov 20 2017 08:32:56)
Included patches: 1-1322
Modified by Gentoo-9999
Compiled by portage@gentoo
Huge version without GUI. Features included (+) or not (-):
+acl +cmdline_hist +eval +job +mouse +num64 +scrollbind +termresponse +windows
+arabic +cmdline_info +ex_extra +jumplist -mouseshape +packages +signs +textobjects +writebackup
+autocmd +comments +extra_search +keymap +mouse_dec +path_extra +smartindent +timers +X11
-autoservername +conceal +farsi +lambda -mouse_gpm -perl +startuptime +title +xfontset
-balloon_eval +cryptv +file_in_path +langmap -mouse_jsbterm +persistent_undo +statusline -toolbar -xim
+balloon_eval_term -cscope +find_in_path +libcall +mouse_netterm +postscript -sun_workshop +user_commands -xpm
-browse +cursorbind +float +linebreak +mouse_sgr +printer +syntax +vertsplit +xsmp_interact
++builtin_terms +cursorshape +folding +lispindent -mouse_sysmouse +profile +tag_binary +virtualedit +xterm_clipboard
+byte_offset +dialog_con -footer +listcmds +mouse_urxvt -python +tag_old_static +visual -xterm_save
+channel +diff +fork() +localmap +mouse_xterm +python3 -tag_any_white +visualextra
+cindent +digraphs +gettext -lua +multi_byte +quickfix -tcl +viminfo
+clientserver -dnd -hangul_input +menu +multi_lang +reltime +termguicolors +vreplace
+clipboard -ebcdic +iconv +mksession -mzscheme +rightleft +terminal +wildignore
+cmdline_compl +emacs_tags +insert_expand +modify_fname +netbeans_intg -ruby +terminfo +wildmenu
system vimrc file: "/etc/vim/vimrc"
user vimrc file: "$HOME/.vimrc"
2nd user vimrc file: "~/.vim/vimrc"
user exrc file: "$HOME/.exrc"
defaults file: "$VIMRUNTIME/defaults.vim"
fall-back for $VIM: "/usr/share/vim"
Compilation: x86_64-pc-linux-gnu-gcc -c -I. -Iproto -DHAVE_CONFIG_H -march=native -O2 -pipe -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1
Linking: x86_64-pc-linux-gnu-gcc -Wl,-O1 -L/usr/local/lib -Wl,--as-needed -o vim -lSM -lICE -lXpm -lXt -lX11 -lXdmcp -lSM -lICE -lm -lncurses -lnsl -lacl -lattr -ldl
-L/usr/lib64/python3.5/config-3.5m -lpython3.5m -lpthread -ldl -lutil -lm
:echo &balloonevalterm
1
Terminal is xterm.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
As it currently works balloon_show() only works after evaluating
'balloonexpr'.
Then it's even more confusing that I don't get any balloons from Termdebug
.
The way I was hoping to use this was to acompany the pumenu
. Get actual completion candidates written to the pumenu
and have parameter hinting in a balloon.
For that to work, balloons need to be able to be shown at cursor position in both, GUI and terminal.
to me balloon_show()
seems to work even if balloonexpr
is unset. But it would be nice to allow track cursor position instead of mouse position, seems weird to restrict a feature like this to only mouse-based workflow. For instance vim-jedi uses tricks (concealing? even changing the buffer?) to show function signature "popup", if balloon at cursor was possible it could use it instead.
It would be even nicer to be able to specify balloon position. That way, for function parameter hinting, balloon can be shown above the function opening bracket. Otherwise it will be dragged along with the cursor while user is typing function arguments.
Sure. I just mean in a cursor-based workflow, I would expect the balloon by default to show up somewhere near the cursor, rather than near a mouse movement that was done a long time ago.
@bstaletic possible workaround for the original issue:
set balloonexpr=Dummy
function Dummy()
" enable balloon_show()
timer_start(0, {t->0})
return ""
endfunction
Now balloon_show works for me (shows up at the last position balloonshow was triggered at).
The timer_start seems to be needed to trick vim into thinking the balloon is computed asynchronously. It's probably needed in YCM's case where the async nature is hidden from vim in ycmd.
Was that solved by 2f10658?
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.