ycm-core / YouCompleteMe

A code-completion engine for Vim
http://ycm-core.github.io/YouCompleteMe/
GNU General Public License v3.0
25.44k stars 2.81k forks source link

YCM prevents Jedi show_call_signatures from working #1890

Closed oblitum closed 7 years ago

oblitum commented 8 years ago

Jedi has an option, g:jedi#show_call_signatures, which when set to 1 or 2 (with noshowmode) will let one see function call signatures after typing (. When YCM is active this doesn't work, even when g:ycm_filetype_specific_completion_to_disable = { 'python': 1 }, I recall setting this before allowed Jedi call signatures to work.

vheon commented 8 years ago

On https://github.com/Valloric/ycmd/pull/292 you said that it was the start to enable #1300. If we do that then we would be able to basically reproduce g:jedi#show_call_signatures directly in YCM so IMHO we would have to see how much would cost us to work on a compatibility issue considering that then we would override this behaviour anyway. I understand that in the meantime would be really bad for users so maybe what I'm saying doesn't make much sense :confused:

vheon commented 8 years ago

@oblitum it doesn't work for any config of g:jedi#show_call_signatures? or only for one for the two?

oblitum commented 8 years ago

It makes sense, I'm just not sure how far 1300 for python is, I'd like to get what I was used to now, anyway, this is not the most important point about this issue, I just wished to have the problem registered.

oblitum commented 8 years ago

@vheon both 1 and 2 don't work.

vheon commented 8 years ago

Just to be sure, are you using your fork or YouCompleteMe from master?

oblitum commented 8 years ago

@vheon in truth, I'm at some random local branch for the swift completer... I'm switching to upstream master to check.

vheon commented 8 years ago

@oblitum I wanted to know if you were already using the JediHTTP version or the old one, thanks.

oblitum commented 8 years ago

same behavior on master.

oblitum commented 8 years ago

my master is at 07f4402.

vheon commented 8 years ago

Ok so it isn't a JediHTTP thing. To your knowledge does jedi-vim have some kind of logging?

oblitum commented 8 years ago

well, that commit does deal with something omni func related =), not sure whether it just happen to be the one, but my previous usage of g:ycm_filetype_specific_completion_to_disable = { 'python': 1 } was to let the omni completer for Jedi (I think), iirc it worked in the past.

oblitum commented 8 years ago

no idea about Jedi logging. I just verify that Jedi is being triggered on . because it's a bit slower than YCM.

vheon commented 8 years ago

what is the value of &omnifunc after you at least once have entered Insert mode?

oblitum commented 8 years ago

@vheon jedi#completions

vheon commented 8 years ago

:sob:

oblitum commented 8 years ago

The fault is not in that commit, I'm trying to find a commit where this has worked... nothing yet, not sure why this is not working anymore.

vheon commented 8 years ago

I just installed jedi-vim and after I enter Insert mode I get youcompleteme#OmniComplete as &omnifunc

oblitum commented 8 years ago

@vheon have you set g:ycm_filetype_specific_completion_to_disable = { 'python': 1 }? that's on purpose to let jedi work.

oblitum commented 8 years ago

For sake of information. I do the same kind of setup with neocomplete (when I use it for python 3). It doesn't interfere with jedi call signatures.

micbou commented 8 years ago

Could you try with let g:jedi#show_call_signatures_delay = 0?

oblitum commented 8 years ago

@micbou thanks! that not only fixed the issue, the signatures are showing up faster. Not sure whether I should leave this open, since this tweak doesn't solve the default setup. I'm affraid whether this conflict may be something that can touch other plugins in other situations.

micbou commented 8 years ago

Yes, let's keep this open. There is definitely an issue when g:jedi#show_call_signatures_delay > 0.

NoAnyLove commented 8 years ago

I had the same issue months ago. I tried neocomplete, it can work work with jedi-vim without break it call signature hint, but it can't show jedi-vim and UltiSnips candidates at the same time, and its configuration is quite complex. So I switched back to YCM.

I had a comment in issue#234, mentioned about the g:jedi#show_call_signatures_delay setting. If it's not 0, the hint will only show up when you move cursor out and forth. The possible affected code is in https://github.com/davidhalter/jedi-vim/blob/master/autoload/jedi.vim, from line 413 to 423. But I didn't learn vimscript, I have no idea what it really happened.

BTW, wish the pull#1300 can directly generate jedi#show_call_signatures from ycm.

oblitum commented 8 years ago

@NoAnyLove Thanks for the info.

micbou commented 7 years ago

This seems to work with g:jedi#show_call_signatures_delay > 0 now. @oblitum Could you confirm?

oblitum commented 7 years ago

@micbou Yes, feel free to close this, the default jedi's call signatures hack is unstable and can be incompatible with anything. This is my current Jedi setup.

vheon commented 7 years ago

@oblitum is there a reason why you re-open this?

oblitum commented 7 years ago

@vheon I've closed by accident. I've ended with "feel free to close" b/c it's up to YCM to chose to be compatible with Jedi's default call signature feature or not.

micbou commented 7 years ago

Let's close since it's now working (apparently, PR #2657 didn't fix the issue so it's probably a change in jedi-vim). We can always reopen if it breaks again.