completor.vim icon indicating copy to clipboard operation
completor.vim copied to clipboard

Support for call signatures in Python (with Jedi)

Open notpratheek opened this issue 7 years ago • 1 comments

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 ! 👍

notpratheek avatar Aug 07 '17 17:08 notpratheek

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.

maralla avatar Aug 23 '17 10:08 maralla