Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Parameter suggestion for custom functions in Visual Studio Code

Is there a way in Visual Studio Code to get IntelliSense to display me the parameters of my custom function within my php file?
It seems to be working with other languages Link
(source: telerik.com)

like image 680
B4DschK4Pp Avatar asked Mar 17 '17 21:03

B4DschK4Pp


1 Answers

As of right now this is not possible natively. Even the popular PHP IntelliSense extension does not support this.

Edit: It seems that the PHP IntelliSense extension has now been updated to support Signature help as well:

I have recently discovered an extension called PHP Intelephense which can do exactly this.

enter image description here

You can even utilize Type Declarations and PHP 7 Return Type Declaration to empower it even more:

enter image description here

The best result is when all type declarations are combined with a DocString, which allows you to write descriptions of parameters. I use the PHP DocBlocker extension to write these, but you could use another, or write them manually.

enter image description here

like image 148
Daniel Avatar answered Oct 04 '22 00:10

Daniel