-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Go to definition shows Node require statement as definition #39895
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@sandersn, this could be impacted by your explorations into making CommonJS requires actual alias symbols. Is that still something you’re looking at? |
Yes, I've been distracted by other JS prototypes for 4.1, but I'll get back to it pretty soon. I'll add this bug to the list of ones to check on. |
Well, on digging into the code, I found two things:
#39770 does fix find-all-refs and improves goto-def -- it jumps to the |
@sandersn do you have an opinion on which of these is a better solution? I.e., is making |
As of 4.0, both Changes in goto-def are less core to the compiler, but might be more complex. It's hard to guess whether this should ship in the RC without making the fix first. If turns out to be simple, I think it would be fine. |
I actually don’t know if this need be specific to |
There’s really not a lot of user feedback on this, and offering too-granular definitions is generally better than making a non-obvious leap past the definition the user was interested in (skipping past an uninteresting declaration is usually as simple as an additional ⌘-click). So, I’ll limit this to skipping past the shorthand property assignments in |
I'm simply doing
and the
calcMargin
call shows two definitions: 1. the require line and 2. the actual function definition that I want to go to.Related but not identical to #37816.
The text was updated successfully, but these errors were encountered: