Language server status item: projects DotRush has loaded
Counts DotRush's projectLoaded events against the active solution and warns when the startup project is missing or projects came from outside the solution. Exposes the data as dotnetSolution.languageServerStatus for other extensions. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0169iPWwKHZoBTNN9qwXiwqk
This commit is contained in:
@@ -4,7 +4,7 @@ Startup project and solution configuration in the status bar, with build, debug,
|
||||
hot reload that actually use them. Built for [DotRush](https://github.com/JaneySprings/DotRush).
|
||||
|
||||
```
|
||||
$(project) MyGame.Editor $(settings-gear) Test | x64 $(debug-alt) $(flame)
|
||||
$(project) MyGame.Editor $(settings-gear) Test | x64 $(debug-alt) $(flame) $(database) 4/4
|
||||
```
|
||||
|
||||
- The **project item** shows which `.csproj` is the startup project, and picks another one
|
||||
@@ -13,6 +13,8 @@ $(project) MyGame.Editor $(settings-gear) Test | x64 $(debug-alt) $(flame)
|
||||
`Test | x64`, `Release | Any CPU` — exactly as `MyGame.sln` lists them.
|
||||
- The **debug button** builds with that configuration and launches the startup project.
|
||||
- The **flame** starts it under `dotnet watch` with hot reload instead.
|
||||
- The **database counter** says how many projects of the solution DotRush's language server has actually loaded.
|
||||
- The **database counter** says how many projects of the solution DotRush's language server has actually loaded.
|
||||
|
||||
## Why, when DotRush already has a status bar item
|
||||
|
||||
@@ -141,6 +143,26 @@ hot reload under those asks whether to switch to Debug first.
|
||||
before the watcher starts, so the Editor's post-build step finds the Builder even on a
|
||||
clean checkout; the watcher's own build is then incremental.
|
||||
|
||||
## Language server status
|
||||
|
||||
DotRush shows a spinner while it loads the workspace and nothing afterwards, so when Find
|
||||
References comes back empty there is no way to tell "no references" from "not indexed".
|
||||
DotRush does raise one `projectLoaded` event per project through its exports; the
|
||||
`$(database) 3/4` item counts those against the solution in the status bar and turns
|
||||
warning-coloured in two cases:
|
||||
|
||||
- the **startup project was never loaded**, so IntelliSense and references miss it;
|
||||
- projects were loaded from **outside the selected solution** (`+1`), which is what a
|
||||
`dotrush.roslyn.projectOrSolutionFiles` pointing at another checkout looks like.
|
||||
|
||||
The tooltip lists loaded and missing projects. Clicking offers *Reload Workspace* (which
|
||||
also resets the count), DotRush's solution picker, and its output channel. The
|
||||
`dotnetSolution.languageServerStatus` command returns the same data for other
|
||||
extensions; *colored-references* uses it to say *why* a search found nothing.
|
||||
|
||||
The count only includes events raised while this extension was listening, so a window
|
||||
where DotRush finished before this extension activated shows 0 until a reload.
|
||||
|
||||
## Usage
|
||||
|
||||
| Action | How |
|
||||
|
||||
Reference in New Issue
Block a user