Skip to content

Move the scope of document symbols to the details.#8111

Merged
sean-mcmanus merged 2 commits intomainfrom
seanmcm/moveDocumentSymbolScope
Sep 8, 2021
Merged

Move the scope of document symbols to the details.#8111
sean-mcmanus merged 2 commits intomainfrom
seanmcm/moveDocumentSymbolScope

Conversation

@sean-mcmanus
Copy link
Contributor

@sean-mcmanus sean-mcmanus commented Sep 7, 2021

Fixes #7785

image

@sean-mcmanus sean-mcmanus requested a review from a team September 7, 2021 21:58
@bobbrow
Copy link
Member

bobbrow commented Sep 8, 2021

This doesn't seem right. Won't this be confusing for people by hiding the scoping information? It looks like foo is defined in f1 instead of showing it under

f1
+--f2
   +--foo
       +--func

@sean-mcmanus
Copy link
Contributor Author

sean-mcmanus commented Sep 8, 2021

The outline view is just designed to have nodes for the {} ranges, i.e. for navigation, i.e. to match the "physical" outline regions that exist in the document -- the full scope on the right is not a priority for the outline view. They would see that either via clicking the item or viewing the right-side if it's visible or doing a Go to Declaration to view the type declaration where the hierarchical scopes exist in the Outline view.

i.e. the reason it should be moved to the right is that it's lower priority info, given the limited UI space of the VS Code UI design. Any confusion about scopes that are hidden on the right don't really matter as much, since it'd be handled by IntelliSense completion or error reporting etc..

I might re-open #8100 for the more difficult solution of creating a node for the "ghost" scopes, i.e. this fix prioritizes making the function name visible on the left when the scope is too big.

@github-actions github-actions bot locked and limited conversation to collaborators Oct 24, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Outline of class's methods in a .cpp fie is difficult to read

4 participants