Skip to content

Fix nested namespace display and nesting in outline#848

Open
chrisdp wants to merge 1 commit into
masterfrom
bugfix/nested-namespace-outline
Open

Fix nested namespace display and nesting in outline#848
chrisdp wants to merge 1 commit into
masterfrom
bugfix/nested-namespace-outline

Conversation

@chrisdp

@chrisdp chrisdp commented Jul 3, 2026

Copy link
Copy Markdown
Collaborator

Fixes the document symbol outline (used when the language server is disabled) for nested namespaces.

Previously a nested namespace showed its full dotted name and was mis-nested: the function preceding it over-extended its range and swallowed the namespace, and namespaces never got an end-of-block range so their members flattened up to the parent.

  • Show only the final segment of a namespace name (deep instead of get.deep), matching the language server
  • Reset the current function at end function/end sub so it no longer over-extends past its own body
  • Track open containers (namespace/class/interface/enum) with a stack and close each at its matching end, so members nest under the correct parent

Closes #554

The document symbol outline (used when the language server is disabled)
showed nested namespaces by their full dotted name and mis-nested them:
a function over-extended its range and swallowed a following namespace,
and namespaces never got an end-of-block range so their members flattened.

- Show only the final namespace segment (`deep` for `get.deep`)
- Reset the current function at `end function`/`end sub`
- Track open containers with a stack and close each at its matching `end`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Don't show namespace again in outline for nested namespaces

1 participant