forcedotcom / salesforcedx-vscode

Salesforce Extensions for VS Code
https://developer.salesforce.com/tools/vscode
BSD 3-Clause "New" or "Revised" License
954 stars 406 forks source link

Go to definition of Apex method from LWC redirects to typings directory #4684

Open randi274 opened 1 year ago

randi274 commented 1 year ago

Summary

When I use CMD + Click or the formal "Go to Definition" command, on the follow line in an LWC file, I would expect to be redirected to the method itself. However, I am redirected to the typings directory, which isn't useful to show to our users.

Steps To Reproduce:

  1. Have an LWC file that points to an Apex method, such as: import getOrderItems from '@salesforce/apex/OrderController.getOrderItems';.
  2. Use CMD + Click or 'Go to Definition'
  3. You will be redirected to .sfdx > typings > lwc > apex > OrderController.ts

Expected result

I would be redirected to force-app > main > default > classes > OrderController.cls

Actual result

I am redirected to .sfdx > typings > lwc > apex > OrderController.ts

Additional information

https://user-images.githubusercontent.com/9795193/219213793-07d8d294-a4d3-417e-8deb-1901ad683b47.mov

Salesforce Extension Version in VS Code: v57.2.1

SFDX CLI Version: sfdx-cli/7.183.1

OS and version: Mac Ventura 13.2

git2gus[bot] commented 1 year ago

This issue has been linked to a new work item: W-12553326