Skip to content
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

Account for function and variable scope in language service features #16

Open
kaylaerdmann opened this issue Aug 12, 2015 · 2 comments
Open

Comments

@kaylaerdmann
Copy link

For the following intellisense features the entire file (or multiple files if dot sourced) is/are being searched through for variable and parameters:

  • Get definition
  • Get references
  • Get occurrences

We need fix this to use the correct scope when searching on variables and parameters.

@kaylaerdmann kaylaerdmann added the Issue-Bug A bug to squash. label Aug 12, 2015
@daviwil daviwil modified the milestone: 0.1.0 Aug 13, 2015
@daviwil
Copy link
Contributor

daviwil commented Nov 9, 2015

This requires similar logic to #28 so potentially both could be developed at the same time.

@daviwil daviwil added the Up for Grabs Will shepherd PRs. label Nov 9, 2015
@daviwil daviwil modified the milestones: 0.2.0, 0.1.0, 0.3.0 Nov 16, 2015
@daviwil daviwil modified the milestones: 0.3.0, Backlog Dec 31, 2015
@daviwil daviwil changed the title Use correct scope on variables and parameters for intellisense features Consider variable scope for language intelligence features May 18, 2016
@daviwil daviwil changed the title Consider variable scope for language intelligence features Account for function and variable scope in language intelligence features May 18, 2016
@daviwil daviwil changed the title Account for function and variable scope in language intelligence features Account for function and variable scope in language service features May 18, 2016
TylerLeonhardt pushed a commit to TylerLeonhardt/PowerShellEditorServices that referenced this issue Jul 16, 2019
…esymbolshandler

A working WorkspaceSymbolsHandler
@andyleejordan andyleejordan removed this from the Backlog milestone Aug 17, 2021
@fflaten
Copy link
Contributor

fflaten commented Jan 15, 2023

Adding an example of this:

function myDemo ($o) {
    $o = "second"
}

$o = "first"
$o # Go to definition here will go to first match -> reassignment on line 2

Update: Preview extension v2023.2.0 includes change from #1984 which now shows all definitions. Good enough? Matching scope is hard, so not sure if/when that will be fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants