Shougo/echodoc.vim

Inserting into another function shows previous function signature

Closed this issue · 9 comments

  1. Insert some parameters (or just enter and move around) to function A, a function echodoc can display the signature for. (The signature should display.)
  2. Leave insert mode. (The signature should disappear.)
  3. Insert into function B, a function that echodoc can't display the signature for.

It will display the function signature for function A rather than nothing.

This is with only deoplete, neco-vim, and echodoc.

Please provide the reproduce-able instructions.
It must be reproduce-able without ESP skills.
If not, I will close/ignore your issue.

Like this:
#51

You need to upload example.

Please compare the issue with yours.
Shougo/deoplete.nvim#934

Your issue is reproduce-able really?

With deoplete, neco-vim, and echodoc installed, take the following 2 lines:

"                               v
call deoplete#custom#_get_source()
echo expand('$HOME/path')
"                       ^
  1. Move cursor to the first opening parenthesis (marked with v).
  2. Press a to enter insert mode inside the parens. The function signature should be displayed.
  3. Press Esc to return to normal mode.
  4. Move down and place the cursor on the second closing parenthesis (marked with ^.
  5. Press i to enter insert mode inside the parenthesis. The function signature for deoplete#custom#_get_source() will be displayed.

OK. It is better.
But ... I have tested your instructions in the minimal vimrc and I have not reproduced it.

So your instruction and minimal vimrc is incomplete.
Closing.

Please update your instruction and minimal vimrc.

Here's a vimrc:

"---------------------------------- General ----------------------------------"
set noshowmode

"-------------------------------- Directories --------------------------------"
let $XDG_DATA_HOME = expand('$HOME/.local/share')
let $DATA_DIR = $XDG_DATA_HOME . '/nvim'  " ~/.local/share/nvim

"----------------------------- Install vim-plug ------------------------------"
let $PLUG_LOC = expand('$DATA_DIR/site/autoload/plug.vim')
if empty(glob($PLUG_LOC))
  silent !curl -fLo $PLUG_LOC --create-dirs
    \ "https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim"
  augroup autopluginstall
    autocmd VimEnter * PlugInstall --sync | source $MYVIMRC | UpdateRemotePlugins
  augroup END
endif

"------------------------------ Install Plugins ------------------------------"
filetype off
call plug#begin('$DATA_DIR/site/plugged')
Plug 'Shougo/deoplete.nvim', {'do': ':UpdateRemotePlugins'}
Plug 'Shougo/neco-vim'
Plug 'Shougo/echodoc.vim'
call plug#end()
filetype plugin indent on

"----------------------------- Configure Plugins -----------------------------"
let g:deoplete#enable_at_startup = 1
let g:echodoc#enable_at_startup = 1
let g:echodoc#enable_force_overwrite = 1

It looks like it only happens with g:echodoc#enable_force_overwrite = 1.

OK. Reproduced it. So I have said:

Please provide the reproduce-able instructions.
It must be reproduce-able without ESP skills.

With deoplete, neco-vim, and echodoc installed, take the following 2 lines:

Oh, no configuration for echodoc!

So:

#63 (comment)

It is the result: this is wasting time, isn't it?

Fixed.

Yep. My bad there. 😅 Thanks for the quick responses and the fix. Keep up the good work.