Skip to content

Add optional DocumentSymbol tooltip support in outline and breadcrumbs#315387

Draft
Copilot wants to merge 3 commits into
mainfrom
copilot/allow-tooltips-on-symbols
Draft

Add optional DocumentSymbol tooltip support in outline and breadcrumbs#315387
Copilot wants to merge 3 commits into
mainfrom
copilot/allow-tooltips-on-symbols

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 8, 2026

Document symbols in outline/breadcrumbs were effectively constrained to name/detail, with breadcrumbs not surfacing richer context. This change adds an explicit symbol tooltip channel and threads it through API conversion and UI rendering so hover text can carry meaningful symbol context.

  • API/model surface

    • Added optional tooltip?: string to DocumentSymbol across core/internal/API typings:
      • src/vs/editor/common/languages.ts
      • src/vs/monaco.d.ts
      • src/vscode-dts/vscode.d.ts
      • src/vs/workbench/api/common/extHostTypes.ts
  • Ext host conversion + command results

    • Preserved tooltip through document symbol converters in extHostTypeConverters.
    • Included tooltip in vscode.executeDocumentSymbolProvider merged document-symbol results in extHostApiCommands.
  • Outline + breadcrumbs hover behavior

    • Updated symbol label title generation to prefer provider-supplied tooltip, with existing fallback retained:
      • src/vs/workbench/contrib/codeEditor/browser/outline/documentSymbolsTree.ts
title: element.symbol.tooltip
	?? localize('title.template', "{0} ({1})", element.symbol.name, symbolKindNames[element.symbol.kind])
  • Coverage update
    • Extended existing document symbol command test to assert tooltip propagation for root and child symbols.

Copilot AI requested review from Copilot and removed request for Copilot May 8, 2026 22:22
Copilot AI linked an issue May 8, 2026 that may be closed by this pull request
Co-authored-by: dmitrivMS <9581278+dmitrivMS@users.noreply.github.com>
Copilot AI requested review from Copilot and removed request for Copilot May 8, 2026 22:27
Co-authored-by: dmitrivMS <9581278+dmitrivMS@users.noreply.github.com>
Copilot AI requested review from Copilot and removed request for Copilot May 8, 2026 22:28
Copilot AI changed the title [WIP] Add tooltips for symbols in outline view and breadcrumbs Add optional DocumentSymbol tooltip support in outline and breadcrumbs May 8, 2026
Copilot AI requested a review from dmitrivMS May 8, 2026 22:29
@dmitrivMS dmitrivMS added outline Source outline view issues breadcrumbs labels May 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breadcrumbs outline Source outline view issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow tooltips/hovering on symbols in outline view and breadcrumbs

2 participants