Repository navigation
Ctrl+G D jumps to a C# symbol's definition, answered by its language server #454
Copy link
Copy link
Closed
Labels
a-team:devClaimed by the a-team DevClaimed by the a-team Dev
Description
Context
First slice of #63: a built-in language server client, proven on C# with csharp-ls. After this merges, a C# developer can jump from a call to its definition in another file in one key, and the status bar tells them whether the server is loading, ready, missing or stopped. This slice carries everything the first jump needs: starting and stopping the server, keeping it in step with open buffers, and the status bar state. See the pitch for the mockups.
Acceptance criteria
With csharp-ls installed (dotnet tool install -g csharp-ls) and a C# solution open:
- Opening a
.csfile showsC# ◌ loadingin the status bar, beside where the language name is today, and it becomesC# ● readyonce the server has loaded the solution. - With the caret on a call to a method declared in another file,
Ctrl+G Dopens that file and puts the caret on the method's name, revealed the way Go to line reveals a line. -
Ctrl+G Pthen goes back to whereCtrl+G Dwas pressed, andCtrl+G Nforward again. - The same works for a type, a property and a local in the same file.
-
Ctrl+G Don a partial class lists its declarations in a picker (the Go to symbol picker's shape);Enterjumps to the one chosen. -
Ctrl+G Dstill finds the right definition after unsaved edits that moved it. -
Ctrl+G Dwith nothing to jump to (whitespace, a keyword) says so in the status bar and doesn't move. - Go to definition is in the Go menu after Go to symbol, showing
Ctrl+G D, dimmed until the server is ready; it's in the F1 palette and on the mnemonicgd, and rebindable in Settings › Keyboard Shortcuts. - Without
csharp-lsonPATH, opening a.csfile or pressingCtrl+G DshowsNo C# language server. Install: dotnet tool install -g csharp-lsin the status bar. Nothing falls back to a text search. - If the server crashes, the status bar shows
C# stoppedand it isn't restarted in a loop. - Opening another folder or quitting leaves no
csharp-lsprocess behind. - Files in languages without a server show just their language name, as today.
- Works the same in the native (AOT) binary.
Tests
- Message framing (
Content-Lengthheaders, split and joined reads), request/response matching, notifications and server-initiated requests the client must answer. - Buffer sync: open, edit, save and close produce the right notifications and versions.
- Server lifecycle with a fake server process: start on first file, one per language and folder, shutdown on folder switch and quit, no restart loop after a crash.
- Mapping a definition result (single location, several, none) to the jump, the picker or the status message.
- The CI AOT job exercises the client (e.g. against a fake server) so trimming can't silently break it.
Out of scope
- Find usages and the References tab (next task).
- Settings › Language Servers, and servers for any language other than C# (later task). C# is hard-wired to
csharp-lsfor now. - Diagnostics, completion, hover, rename, formatting, server-backed Go to symbol.
- Installing the server for the user.
- StreamJsonRpc or any other RPC library: the pitch decided on a hand-rolled client.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
a-team:devClaimed by the a-team DevClaimed by the a-team Dev
Activity
a-team-app commentedon Oct 8, 2026
Draft PR #485 is up.
Give the language server tests their own stop timeout