maralla / completor.vim

Async completion framework made ease.
MIT License
1.29k stars 63 forks source link

Docs preview window not showing #199

Closed leighmcculloch closed 6 years ago

leighmcculloch commented 6 years ago

The autocompletor works amazing and displays a pop-up, but the docs preview window is not displaying when autocompleting. Is there an option that needs enabling to display the docs window?

serge-rgb commented 6 years ago

+1. I'm loving this plugin. My only problem so far is that the completion tooltip closes the preview window for some reason.

leighmcculloch commented 6 years ago

If like to solve this but I'm a bit lost on where to start. @serge-rgb is you vimrc anywhere I could :eyes: to look for similarities with mine that might be the cause? I use vim-go and vim-auto-save and I wonder if it's one of those.

serge-rgb commented 6 years ago

Sure thing. I just made a gist.

leighmcculloch commented 6 years ago

Looks like we share these plugins:

'tomasr/molokai' 'scrooloose/nerdtree'

maralla commented 6 years ago

Some file type complete engine has no doc provided so the preview window not shown. Some file type like python do have the preview window, and the default behaviour is to closed the window when completion completed. If the file type support docs there has an option to make the preview window not close after completion let g:completor_auto_close_doc = 0.

leighmcculloch commented 6 years ago

@maralla I'm using this with Go, which as I understand supports the preview window, and the issue isn't that the preview window is closing too soon, my issue is it's not opening at all.

leighmcculloch commented 6 years ago

My vimrc is pretty small, this is it: https://github.com/leighmcculloch/vim_dotfiles/blob/24a75b1/vimrc

maralla commented 6 years ago

Please update to the latest commit which I just pushed to enable the preview window for Go.

leighmcculloch commented 6 years ago

@maralla Thanks, that was fast! I gave it a go with commit f99230f and the preview now opens, but the only information displayed in the preview is the declaration of the identifier. For example, for a function, only func funcName(args) returnValue is shown. The godoc for the function isn't shown.

leighmcculloch commented 6 years ago

@maralla Do I need to install a another tool other than gocode to get the actual godoc text?

maralla commented 6 years ago

Godoc is current not supported by completor. Completor only uses gocode for completion and the content of preview window is provided by gocode not godoc. But the support for godoc is planned.

leighmcculloch commented 6 years ago

If nobody is already working on adding support for godoc I'd like to take a stab at it.

leighmcculloch commented 6 years ago

@maralla I took a stab at it, see #202. I've got it working, but I need some guidance on how to improve the solution.