# 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. 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.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`: ```bash 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