Skip to content

Feature request: "Go to Definition" works across all files in a workspace #499

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

Closed
adbertram opened this issue Feb 10, 2017 · 8 comments
Closed
Assignees
Labels
Area-Symbols & References Issue-Enhancement A feature request (enhancement). Resolution-Fixed Will close automatically.

Comments

@adbertram
Copy link
Contributor

It'd be super-convenient for me if I could right-click on a function call click "Go to Definition" and it would find the module (if exists) that's in my current workspace, open up that file and then go to the function declaration.

@daviwil
Copy link
Contributor

daviwil commented Feb 10, 2017

Yep, we have a lot of work to do on the symbol features in PowerShell Editor Services. We need to start working on module-level analysis to enable this.

@daviwil daviwil added the Issue-Enhancement A feature request (enhancement). label Feb 10, 2017
@TylerLeonhardt
Copy link
Member

This sounds close to #420. There should be some overlap but I'm not certain if/what unique changes there are to these two issues.

@rfoust
Copy link

rfoust commented Dec 15, 2018

Hi, any updates on this? I stumbled across this issue when figuring out if CodeLens was supposed to look for function names across multiple modules in the workspace. I think this is related?

@TylerLeonhardt
Copy link
Member

There's been some work to improve this. Probably not in the space you're hoping. I don't think I quite understand your comment - can you give an example, @rfoust?

@rfoust
Copy link

rfoust commented Nov 5, 2019

@TylerLeonhardt oops it's been a year, guess I'll reply now lol. :) I mean if I have multiple module folders open in the workspace and I'm looking at a function definition "function Get-Something" then right above it, it says "0 references" but there are really all kinds of references to it in other modules that I'm editing in my workspace, it just isn't seeing them.

Screen Shot 2019-11-05 at 12 28 19 PM

@ghost ghost added the Needs: Maintainer Attention Maintainer attention needed! label Nov 5, 2019
@rjmholt rjmholt removed the Needs: Maintainer Attention Maintainer attention needed! label Nov 12, 2019
@fflaten
Copy link
Contributor

fflaten commented Feb 20, 2023

What's the scope of this issue?
Initial post reads like definitions in same workspace. That should work in general now. Multi-root workspaces (introduced later I believe) will still need some work.

Be aware that the lookup is not module-aware, so conflicting function names might cause multiple returned definitions and wrong reference count.

Tracking definitions across Import-Module (and PSIC-imported modules outside workspace?) sounds like a separate issue.

@andyleejordan
Copy link
Member

@fflaten actually I just made multi-root workspaces work in the last preview! I believe this is finished, besides what you point out with imported modules. So let's close this and leave #420 open I think.

@andyleejordan andyleejordan self-assigned this Feb 21, 2023
@andyleejordan andyleejordan added the Resolution-Fixed Will close automatically. label Feb 21, 2023
@ghost ghost closed this as completed Feb 21, 2023
@ghost
Copy link

ghost commented Feb 21, 2023

This issue has been marked as fixed. It has been automatically closed for housekeeping purposes.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Symbols & References Issue-Enhancement A feature request (enhancement). Resolution-Fixed Will close automatically.
Projects
None yet
Development

No branches or pull requests

7 participants