roxma / nvim-completion-manager

:warning: PLEASE USE https://github.com/ncm2/ncm2 INSTEAD
MIT License
917 stars 49 forks source link

Compatibility with echodoc #76

Open sassanh opened 7 years ago

sassanh commented 7 years ago

Currently ncm doesn't work with https://github.com/Shougo/echodoc.vim I guess it's because the v:completed_item is not set properly so that echodoc can use it. Is it possible to make it compatible with echodoc?

jsfaint commented 7 years ago

echodoc.vim works with ncm on my side. With this map (behavior like deoplete)

inoremap <expr><CR> (pumvisible()?(empty(v:completed_item)?"\<C-n>\<C-y>":"\<C-y>"):"\<CR>")
sassanh commented 7 years ago

Yeah, it's working now for me too. I close this issue.

wwwdata commented 7 years ago

Hm, got the same problem here as well. It works flawlessly for completion in go files but not within javascript files with the tern and flow plugins. Anybody has echodoc working for that as well?

sassanh commented 7 years ago

it works for console.log() but it doesn't work for PropTypes.any() for example (From react prop-types).

jsfaint commented 7 years ago

echodoc fail to work with recently ncm on my side. Does anyone meet the same issue?

jsfaint commented 7 years ago

echodoc.vim work with press <c-n> and <c-y> manually, but fail to work with the setting below in current version of ncm.

inoremap <expr><CR> (pumvisible()?(empty(v:completed_item)?"\<C-n>\<C-y>":"\<C-y>"):"\<CR>")

I use git bisect to track the issue The setting still works in this commit 41bc1a201f36b2b81c06d0185765a7e03886f0e3 asciicast

But fail to work in this commit 6053343b567c3ced2ac77a36a0593721499bfea0 asciicast

viniarck commented 6 years ago

+1. Thanks!