php-language-server icon indicating copy to clipboard operation
php-language-server copied to clipboard

Follow References for traits

Open felixfbecker opened this issue 8 years ago • 2 comments
trafficstars

From @GeraldNDA on March 14, 2017 17:57

It'd be great if I could go to the trait definitions or see the definition of methods defined by traits. Also parent seeing the definition for method calls and $this method calls would also be amazing.

Examples: image

Copied from original issue: felixfbecker/vscode-php-intellisense#89

felixfbecker avatar Mar 14 '17 18:03 felixfbecker

+1 it's a very important use case for me too. I'm using Yii2 PHP framework for developing my project and this framework has a lot of traits. And I should using vscode with vscode-php-intellisense ext. and also I have open phpstorm IDE for these cases - it's not cool((

UPD: Extension https://github.com/bmewburn/vscode-intelephense already covers my case - this ext. already has autocomplete for traits

mgerasimchuk avatar Feb 24 '20 08:02 mgerasimchuk

I was about to post a new issue, but I suspect it might be related to this one. I'm having an issue related to traits.

In the following setup, the extension doesn't seem to recognize the Foo trait in the MyClass if the MyClass is in some namespace. If I remove (comment out) the MyClass from a namespace to the global scope, then the Foo trait gets recognized.

Screenshot of the files

I like moving around files using Ctrl + Click, and traits are giving me a headache.

The related files, a recording of the issue (mp4, gif, jpg) can be found at: https://github.com/akinuri/dump/tree/master/vscode/intellisense

Any chance this will be fixed?

Also, is this related to #331? If not, should I create a new issue?

akinuri avatar Apr 06 '21 16:04 akinuri