felixfbecker / php-language-server

PHP Implementation of the VS Code Language Server Protocol 🆚↔🖥
ISC License
1.15k stars 185 forks source link

Show full PHP function definitions #558

Open borlak opened 6 years ago

borlak commented 6 years ago

There is no return type, or argument information. I have php.suggest.basic set to false, so as far as I can tell this is all coming from the intellisense extension.

Example of what I see (sorry, this is a camera pic): screen shot 2017-12-21 at 12 36 58 pm

There is also the <?php but I think other issues have brought this up.

Example of what is desired:

screen shot 2017-12-21 at 11 08 14 am

This is from Netbeans, and there is a scrollbar which shows some more information about the return variable in this case.

felixfbecker commented 6 years ago

Yes, hovers only show the declaration line and description atm. Feel free to do a PR to improve

phil-nelson commented 6 years ago

This is actually very easy if we want to utilise the SignatureInformation that is now stored in definitions:

function-hover

Looks a bit messy though, not sure if there's a better way to present this information

felixfbecker commented 6 years ago

Oh yeah, it's not a hard feature by any means. But it should definitely not be shown as a code block, but in some markdown table or list. I think it would also be good to take a general approach of not showing what's in the SignatureHelp, but showing a table of all @tags in the docblock.