davidhalter / jedi-vim

Using the jedi autocompletion library for VIM.
MIT License
5.27k stars 370 forks source link

Interaction with copilot #1109

Closed mzealey closed 1 year ago

mzealey commented 1 year ago

Issue

Firstly, thanks for this great plugin!

I'm trying to use it with the github copilot plugin too but it seems like often they are not interacting very well, often seeing some stuff like '?!?jedi' in the copilot auto-complete line

For example:

print(re.sub(r'(?<=\w)(?=[A-Z])', '_', 'HelloWorld'))?!?jedi=0, ?!? (*_*pattern: AnyStr*_*, repl: AnyStr, string: AnyStr, count: int=..., flags: _FlagsType=...) ?!?jedi?!?   

Do you have any suggestions as to how to debug further?

davidhalter commented 1 year ago

You should probably just show the signatures in a different place (from the README):

Jedi displays function call signatures in insert mode in real-time, highlighting the current argument. The call signatures can be displayed as a pop-up in the buffer (set to 1 by default (with the conceal feature), 2 otherwise), which has the advantage of being easier to refer to (but is a hack with many drawbacks since it changes the buffer's contents), or in Vim's command line aligned with the function call (set to 2), which can improve the integrity of Vim's undo history.

let g:jedi#show_call_signatures = "1"