You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Include regions in symbol list/outline/breadcrumbs #3210
It'd be helpful for navigating large scripts that don't make heavy use of functions if #regions were available for navigation on the go to symbol menu, outline, or breadcrumbs like functions etc are now.
Reacted by Travis C. LaGrone, Aleksej Egorov and Stuart Tett
Go to symbol: Out of scope in the current PR. Does it make sense to see ex. hundreds of "#region helperfunctions" because you have them in every file?
Breadcrumbs: Out of scope in the current PR. It causes trouble with outline-hierarchy because endregion could be inside ex a function, breaking the hierarchy/nesting in outline. Maybe possible after we move to newer API (DocumentSymbol), can't test yet.
Any other languages that have these symbols-features for regions? Haven't seen any myself.
Maybe possible after we move to newer API (DocumentSymbol).
I think we gotta prioritize doing this. I don't like using a deprecated API, but damn, keeping track of parent/child relationships when building the symbol tables doesn't seem like it'll be easy to get right.
Go to symbol
This should "just work" unless you explicitly skip them in that logic, no?
keeping track of parent/child relationships when building the symbol tables doesn't seem like it'll be easy to get right.
Tracking parent should be easy. Efficiently building the symbol-tree from Parent-reference might be a bit harder. Unless we just store a list of children per symbol also. Feels redundant, but at the same time, we clear and rescan every symbol on file change so should always be in sync. (Should move this to own issue)
Go to symbol
This should "just work" unless you explicitly skip them in that logic, no?
Yes. Intentionally ignored in PR because it felt noisy. That's why I was hoping for feedback here. Maybe it's just me. 🙂
Activity
fflaten commentedon Feb 7, 2023
Outline is being worked on in PowerShell/PowerShellEditorServices#1911 for quick navigation 👍
Go to symbol: Out of scope in the current PR. Does it make sense to see ex. hundreds of "#region helperfunctions" because you have them in every file?
Breadcrumbs: Out of scope in the current PR. It causes trouble with outline-hierarchy because endregion could be inside ex a function, breaking the hierarchy/nesting in outline. Maybe possible after we move to newer API (
DocumentSymbol), can't test yet.Any other languages that have these symbols-features for regions? Haven't seen any myself.
andyleejordan commentedon Feb 7, 2023
I think we gotta prioritize doing this. I don't like using a deprecated API, but damn, keeping track of parent/child relationships when building the symbol tables doesn't seem like it'll be easy to get right.
This should "just work" unless you explicitly skip them in that logic, no?
fflaten commentedon Feb 7, 2023
👍
Tracking parent should be easy. Efficiently building the symbol-tree from Parent-reference might be a bit harder. Unless we just store a list of children per symbol also. Feels redundant, but at the same time, we clear and rescan every symbol on file change so should always be in sync. (Should move this to own issue)
Yes. Intentionally ignored in PR because it felt noisy. That's why I was hoping for feedback here. Maybe it's just me. 🙂
andyleejordan commentedon Feb 23, 2023
There is actually "Go to Symbol In Editor" which means only the current file (and I think it's fed via
Occurrencesin PSES) so we can do this.fflaten commentedon Feb 24, 2023
Good catch! We got that included for free with DocumentSymbolHandler 👍
andyleejordan commentedon Feb 28, 2023
Resolved!