vscode-js-annotations icon indicating copy to clipboard operation
vscode-js-annotations copied to clipboard

Support PHP files

Open mikeerickson opened this issue 7 years ago • 4 comments

Would love to see this functionality in PHP files as well. I still use PHPStorm for most of my PHP work, but I have come reliant on this capability in PHPStorm.

mikeerickson avatar Oct 21 '18 01:10 mikeerickson

Hey Mike,

I personally haven't used PHP before, but I think it would be neat to continue adding more languages to be supported by this extension. The key focus of this project is to find function calls in files and then use VS Code's "Go To Definition" feature to find the names of the params and then annotate away.

In JS & TS, it either uses the standard libraries found in browsers (the window object), or in the node runtime, and as well, it has a module system which easily allows for files to be connected. As I said before, I haven't used PHP, but if you could possibly help out and confirm for me that if you go to a function call and right click on it and if it has a "Go To Definition" action in the right click menu and it brings you to the definitions for said functions / methods, The only hurdle would be to parse PHP files to look for those function calls to annotate.

Although my main focus is for this extension originally was for annotating JS files, extending it further to annotate more languages is a great feature request 😄

lannonbr avatar Oct 21 '18 01:10 lannonbr

@mikeerickson If you are still intersted for this functionality in PHP files, you can try this extension PHP Parameter Hint. I've just released it so it can have some bugs, but so far i didn't find any. Thanks for inspiration @lannonbr and sorry if this post is inappropriate.

robertgr991 avatar Mar 12 '20 17:03 robertgr991

@robertgr991 have you checked out IntelliJ Parameter Hints extension? I was so happy when I eventually found it. If I didn't I'd likely try your extension for sure. Anyway, it's awesome you made that functionality, gave you a star!

Dozorengel avatar Mar 14 '20 06:03 Dozorengel

@Dozorengel Yes, initially I was using that extension but it has some bugs(ex: nested function calls are not hinted) and it was not very customizable so that's why I tried to implement one as well. Thx for the star and you can still try it to see it it more helpful.

robertgr991 avatar Mar 14 '20 08:03 robertgr991