maralla / completor.vim

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

Add support to view docstring in pop-up window and goto definitions(Python) #145

Closed TerminalWitchcraft closed 6 years ago

TerminalWitchcraft commented 6 years ago

I have recently switched from vim-jedi to completor. Its super fast and stable(especially for completions like tensorflow and numpy), but I miss some features from vim-jedi(or maybe its there but I am not aware of!)

First, the ability to view docstring when pressing "K" Second, the ability to jump to definitions using g

Are there any plans on implementing these features? or maybe some workarounds/hacks?

maralla commented 6 years ago

You can call the function completor#do('definition') to jump to definition. If the definition can be found it will be open in the current window. Here is an example key mapping for using control-d as the trigger:

noremap <c-d> :call completor#do('definition')<CR>
maralla commented 6 years ago

The ability to view docstring is planned.

maralla commented 6 years ago

Now you can call the function completor#do('doc') to view docstrings. Here is the key mapping settings for using K:

noremap <s-k> :call completor#do('doc')<CR>
TerminalWitchcraft commented 6 years ago

Thanks @maralla ! That worked for me.

This completely removes the dependency of davidhalter/jedi-vim from my vimrc and I can use completor for all my tasks related to completions.

ghost commented 6 years ago

I can't jump to definition, is definition must be in same current buffer? Don't know what did I miss.

BTW it shows only first field, suppose to have two fields?

https://i.imgur.com/Q8k80tB.jpg

zjyExcelsior commented 6 years ago

import timeimport datetime 无效,:call completor#do('definition') 命令跳转不过去。@maralla