Closed traed closed 5 years ago
Does it occur on an object creation expression -- new Foo()
? How many definitions are shown in the peek? Please show an example or screenshot.
Yes, object creation. Two definitions, one for the class signature and one for the __construct-method. Also, if the file is symlinked it shows up an additional time and points to the original file.
Not symlinked:
Symlinked:
Thanks, vsocde shows the peek UI when multiple definition locations are returned. Providing the class and constructor locations is intended here as a user may want either the class definition or constructor definition (which could be on a base class). Tracking the symlink issue in #356 .
Is it possible to jump straight to the class if there's only one file?
I understand that you might want to see the constructor from another class, but if there's only one class it feels like an extra click, or that I've done something wrong.
(Sorry for reviving an old thread - I can open a new issue if you prefer)
@jasonvarga take a look at the vscode editor.gotoLocation.multipleDefinitions
setting.
Thanks 👍
When right-clicking on a class name and choosing Go to Definition the Peek Definition menu is shown instead of the class file being opened.
OS: MacOS 10.14.3 VS code version: 1.32.3 Ext. version: 1.0.8