maxandClaude Opus 5 92ff02f7ff Dock the results table in the bottom panel
createWebviewPanel only ever lives in the editor area, so the table could
not be dragged next to Terminal / Problems. A WebviewView can, and it can
also be dragged to either side bar.

- Extract ResultsView: the table's html, messaging, row building and
  navigation, independent of what hosts the webview. ReferencePanel keeps
  hosting it in an editor group; ReferenceViewProvider hosts it in a
  contributed panel view container. Results that arrive before the docked
  view has been resolved are queued and applied on resolve.
- coloredReferences.panelLocation selects the placement: bottom (default),
  beside, or below. "below" makes the editor row first so the table is wide
  and short, which suits the column layout better than a tall narrow group.
- sourceColumn() now ignores editors with no view column, so opening a
  reference from the docked view lands in a real editor group.
- toggleView and the refresh button work from either host.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-07 16:23:02 +02:00

Colored References

Find All References results shown the way Visual Studio does it — in two views.

Editor view (default) writes the results into a read-only virtual document in the same language as your source file, so your theme's grammar colors every line for free. File headers show the containing project (.csproj/.fsproj/.vbproj) and reference count; the referenced symbol is highlighted; line numbers are shown in the gutter.

Panel view shows the same results as a table with resizable, sortable columns — Code, File, Line, Project and Containing member — grouped by file, with a filter box. By default it docks in the bottom panel alongside Terminal and Problems, where a wide, short table reads best; you can drag it to either side bar, or set coloredReferences.panelLocation to put it in an editor group instead.

Works with any language server that implements references: DotRush, C# Dev Kit, OmniSharp, TypeScript, Rust, Go, ...

Usage

Action How
Find references Ctrl+Alt+F12 (Cmd+Alt+F12 on mac), right-click → Find All References (Colored), or the command palette
Pick a view explicitly References: Find All References in Colored Editor / … in Results Panel
Switch the current results to the other view Ctrl+Alt+Shift+F12, or the split icon in the tab bar
Go to a reference Enter, F12, or Ctrl+Click on a result line. Enter on a file header opens the file.
Re-run the search F5, or the refresh icon in the tab bar / panel toolbar

In the panel, a single click previews a reference without leaving the panel, Enter or a double-click jumps to it, arrow keys walk the list, Ctrl+F focuses the filter, and clicking a column header sorts by it. Drag a column edge to resize it; double-click the edge to reset it.

Settings

  • coloredReferences.view — which view Find All References (Colored) opens: document (default) or panel
  • coloredReferences.panelLocation — where the panel opens: bottom (default, docked next to Terminal / Problems and draggable to a side bar), beside (editor group to the side), or below (editor group underneath, so the table is wide and short)
  • coloredReferences.openBeside — open results beside the current editor (default true)
  • coloredReferences.showProject — show the containing project in file headers (default true)
  • coloredReferences.reuseTab — reuse one results tab/panel instead of opening a new one per search (default true)

Install

Either install the .vsix (Extensions view → Install from VSIX…) or open this folder in VS Code, run npm install, and press F5 to launch an Extension Development Host.

Tests

npm test launches a real VS Code against a C# solution, waits for the language server to answer, and asserts on the rendered results — that every displayed line maps back to the source line it claims, that navigation and hover work, that the panel's rows highlight the right occurrence, and that the containing member resolves.

Point it at your own solution with COLORED_REFS_TEST_FOLDER:

COLORED_REFS_TEST_FOLDER=/path/to/solution npm test

The run opens a generated .code-workspace that pins DotRush to the solution found in that folder, so your repository's own .vscode/settings.json is left alone. C# Dev Kit and OmniSharp are disabled for the run so the expected results stay deterministic.

Known limitations

  • Coloring in the editor view is TextMate-only (no semantic tokens), since language servers only serve semantic tokens for real files. Types and identifiers therefore look like they do in a freshly opened file before the server has analyzed it.
  • The panel's code column cannot use your theme's token colors: webviews are not given them as CSS variables. It approximates the stock Dark+/Light+ hues instead. Semantic tokens (roadmap 2) would replace this.
  • Read/write kind is not shown yet — no language server reports it through the standard reference request.
  • Some language servers try to attach to every document of their language, including the virtual one, and may log a harmless error about an unknown URI scheme.

Roadmap

  1. Webview panel with resizable, sortable columns — done; missing: virtualized rendering for very large result sets, and remembering column layout per workspace rather than per panel
  2. Semantic token overlay via vscode.provideDocumentSemanticTokens
  3. Filter by project / exclude tests
  4. Optional DotRush fast path for containing member + read/write kind
S
Description
No description provided
Readme MIT
277 KiB
2026-09-07 17:50:02 +02:00
Languages
TypeScript 74%
JavaScript 19.9%
CSS 6.1%