shawncplus / phpcomplete.vim

Improved PHP omnicompletion
http://www.vim.org/scripts/script.php?script_id=3171
595 stars 110 forks source link

Preview window for constructor #91

Closed phil-nelson closed 7 years ago

phil-nelson commented 8 years ago

I see completion and get the preview window with docblock information when I cycle through an objects methods, however the same doesn't happen for a constructor when I cycle through completion for an object, e.g. "new Foo", I see "Foo c [ string $foo = "bar"]" in the popup but I don't see any docblock information for the constructor in the preview window. Is it possible to see constructor information in the preview window?

Thanks

complex857 commented 8 years ago

Good idea! I myself don't use the preview window that often so from the top of my head I'm not sure if this is a bug or a missing feature. I'll investigate.

complex857 commented 8 years ago

I've added the feature to the "completing-a-class-name" scenario (this seem to be the only one where it makes sense to me), but i must tell you: If you have more than a few results this is going to be extremely slow, since we don't have a ready made collection of these strings so the plugin will try to gather all the result's source files and scan trough them, so I'm somewhat reluctant to add it to master. The g:phpcomplete_parse_docblock_comments option already makes the plugin really slow (it's slow without it to begin with...).

I've pushed the code into a branch called pr91, please take a look on how it's working out for you.

complex857 commented 7 years ago

I'm gonna close this one for housekeeping.