maralla / completor.vim

Async completion framework made ease.
MIT License
1.31k stars 62 forks source link

Support for call signatures in Python (with Jedi) #131

Open notpratheek opened 7 years ago

notpratheek commented 7 years ago

Hello,

Are there plans to add the call_signatures support for Python completions ?

Jedi seems to support this out of the box !

http://jedi.readthedocs.io/en/latest/docs/plugin-api.html#jedi.api.Script.call_signatures


jedi-vim has this support.

From what I could figure out, there is implementation of it here : https://github.com/davidhalter/jedi-vim/blob/master/jedi_vim.py#L187

and there is supporting method to go along with it here : https://github.com/davidhalter/jedi-vim/blob/master/jedi_vim.py#L355

Thanks for the great plugin ! 👍

maralla commented 7 years ago

Now you can call the function completor#do('signature') to get the call signature. The result will be echoed to the command line. You can map a key to call the function automatically:

inoremap ,s <c-o>:call completor#do('signature')<CR>
noremap ,s :call completor#do('signature')<CR>

then press ,s to trigger signature.