davidhalter / jedi-vim

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

[feature request] Async call signature fetching #761

Open morphheus opened 6 years ago

morphheus commented 6 years ago

My biggest pet peeve with call signatures is the initial delay required for loading the module containing the desired function. This delay is fairly short, ~500ms on average, maybe 1s for Scipy stuff. However, it blocks visual updates, preventing the user from seeing what they type until the call signature can be displayed.

Ideally, the module loading should be done in asynchronously.

This is something I would be willing to implement myself. How much work would be required for such a change? I'm also not sure how this would tie in with the open PR #420 .

davidhalter commented 6 years ago

I don't know how easy asynchronous stuff is with Jedi. what do you think @blueyed? It's probably only possible with neovim and VIM 8+? right? I don't think Python's threading would be enough.

blueyed commented 6 years ago

Not sure either.

We should maybe consider to hook into the existing vim-echodoc framework? It only supports the cmdline though, and is maybe not even async itself by now - have not checked. https://github.com/Shougo/echodoc.vim

blueyed commented 6 years ago

I think https://github.com/davidhalter/jedi-vim/pull/652 addresses this.

blueyed commented 6 years ago

Just noticed that https://github.com/davidhalter/jedi-vim/pull/420 is also from me, but older - it might be obsolete, or only some parts would be still relevant.

blueyed commented 6 years ago

@morphheus If you are still willing to help here, please try/review #652 first I would say.