-
Notifications
You must be signed in to change notification settings - Fork 500
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
Inner (variable) symbols not found/displayed #1465
Comments
This is implemented in the latest preview. Please give it a try and provide feedback. Personal opinion: it feels a bit noisy, so would probably vote for hiding all variable (re-)assignments in outline/go to symbol. |
You now @fflaten I just thought of a clever albeit maybe hacky way to do that. When adding a variable, if there's already one marked as a declaration in the bag of variables, just add it as a non-declaration. So there's only ever one "declaration" and it's probably the first one encountered. |
I believe that would make the inner assignment the definition in the example below which feels a bit weird. Function abc {
$myvar = 'inner'
}
$myvar = 'outer' Maybe first assignment per parent (when that is tracked)? (Also, just adding a reference to duplicate issue #356) |
This issue has been marked as fixed. It has been automatically closed for housekeeping purposes. |
System Details
Issue Description
Not sure if this is vscode-powershell or PowerShellEditorServices issue, but vscode is where I noticed it.
Not all symbols are indexed for the currently loaded script file, and therefore are not available as navigation targets.
For example:
This simple script has, in my opinion, five symbols defined.
The outliner and the symbol search only show three symbols though:
The two inner variables are not captured.
In larger scripts, and especially in module functions, this means almost every single variable is unavailable for navigation.
It would be good if these inner symbols were also available for navigation.
Attached Logs
The text was updated successfully, but these errors were encountered: