Repository navigation
Description
Opportunity
When I read unfamiliar C#, Go or TypeScript, I often land on a call through an interface or an abstract method, like _store.SaveAsync(...) or a handler that DI wires up. I want to see the code that actually runs. Go to definition (Ctrl+G D) stops at the interface declaration, which has no body. Find usages (Ctrl+G U) lists the callers, not the implementations. So I end up text-searching for the method name or : IStore and picking the real one out of the hits by hand.
In a codebase built on interfaces, this is the hop I make most often, and it's the only one TuiCode's code navigation can't make.
- VS Code has Go to Implementations (Cmd+F12), and Rider has Go to Implementation (Cmd+Alt+B). Both work on interface and abstract members and on the types themselves.
- The servers TuiCode offers answer LSP
textDocument/implementation: csharp-ls, the Roslyn server, gopls (docs), typescript-language-server and rust-analyzer. pyright and pylsp don't. TuiCode never sends the request today (Languages/LanguageServer.cssends definition, references, hover and the symbol requests). - Go to definition (#454), Find usages (#455), library sources (#610) and Go to type (#653) have all shipped. This pitch reuses their jump and their Definitions of picker.
Options considered
- Do nothing. Keep using Find usages or Find globally and pick the right hit by hand. It costs nothing, but the hop stays slow and error-prone, and it's the one interface-heavy code needs most.
- Make Go to definition jump past the interface. When the declaration has no body and there's exactly one implementation,
gdwould go straight there. That saves a key, but it's surprising: sometimes you do want the contract and its doc comment, and thengdwould never get you there. It also hides what happened. - List implementations in the Usages tab (Find implementations). The list would stay in the pane. That's good when there are a dozen, but most interfaces in an app have one or two implementations, so it costs a trip to the sidebar and a second
Enterfor the common case. - A new Go to implementation command that works like Go to definition (chosen). With one answer it jumps. With several it opens the same picker
gduses for a partial class. With none it says so on the status bar. One key covers the common case, the picker handles the rare one, and nothing the user already relies on changes.
Proposal
A new command, Go to implementation (Ctrl+G I, mnemonic gi, in the Go menu beside Go to definition). It's Editor-scoped and works on the name under the cursor:
- One implementation: jump there, recorded as an explicit jump so
Ctrl+G Pcomes back, and revealed the waygdreveals a jump (unfolding it, below any sticky lines). - Several: the Definitions of picker, titled
Implementations of IStore.SaveAsync, one row per implementation (File.cs:12 code on that line), filterable.Entergoes to the selected one andEscleaves the cursor where it was. - None:
No implementations of SaveAsyncon the status bar. - On a concrete method or class the server answers with the thing itself (or its overrides and subclasses), so the command still does something sensible.
- In a library type, answers in referenced assemblies open as read-only decompiled sources, as
gd's do. - A server that can't answer (it doesn't advertise implementation support, like pyright):
Pyright can't find implementationson the status bar, rather than an empty result that looks like there aren't any. - With no server, or while it loads, the command says what
gdsays, and the menu dims it as it dimsgd.
Mockup
On _store.SaveAsync(order) with two implementations, Ctrl+G I:
┌ Implementations of IStore.SaveAsync ────────────────────────────┐
│ Filter: [ ] │
│ ▸ SqlStore.cs:48 public async Task SaveAsync(Order o) │
│ InMemoryStore.cs:21 public Task SaveAsync(Order o) │
│ │
│ [ Go to ] [ Cancel ] │
└─────────────────────────────────────────────────────────────────┘
With one implementation there is no dialog: the cursor lands on SqlStore.cs:48, and the status bar shows the usual jump.
Scope
In: the textDocument/implementation request, with the client capability declared. The command, key, mnemonic, menu item and F1 row. Quick info moving to qi and Ctrl+G Q. In the leader, Enter sends a complete mnemonic that starts a longer one, so q Enter runs Quit. The one/several/none behaviour above, including decompiled answers and servers that can't answer.
Out: a type hierarchy view (supertypes and subtypes as a tree). Go to base (the reverse hop). Showing implementation counts inline (code lens). A peek view that shows the code without leaving the file.
Delivery
One PR. It's one request plus a command that reuses gd's jump and picker.
Decided
- Quick info moves to make room (you, on this pitch). Go to implementation takes
giandCtrl+G I. Quick info becomesqi, keyCtrl+G Q, Go menu hotkeyQ. Its F1 row and the menu's key hint follow.Ctrl+G Qwas my pick to matchqi; you approved it. - Quit stays
q, andq Enterquits (you, on this pitch). A mnemonic runs as soon as the keys typed can only mean one command; a complete mnemonic that also starts a longer one waits forEnter. On mainEnteronly runs the one row still listed, so this PR makesEnterrun the complete mnemonic you've typed. The prefix-free test becomes a test that every mnemonic can be reached. Ctrl+G Ias the default key (yours, from the register: you, on When I'm in a file, I can't get to it in the explorer to see what sits beside it #648 and I know the type I want but not its file, and nothing finds it by name #649).- It jumps on a single answer, with no picker (mine). That's how
gd, VS Code and Rider behave. - It doesn't appear in Quick info's buttons (mine). That box's bottom border already narrows to fit two buttons.
Original idea
Opportunity
Reading unfamiliar C#, Go or TypeScript, I land on a call through an interface or an abstract method (_store.SaveAsync(...), a handler registered by DI) and want to see the code that actually runs. Go to definition (Ctrl+G D) takes me to the interface declaration, which has no body. Find usages (Ctrl+G U) lists every caller, not the implementations. So I fall back to a text search for the method name, or : IStore, and pick the real one out of the hits by hand.
This is the most common hop when you're trying to understand a codebase built on interfaces, and it's the one hop TuiCode's code navigation doesn't make.
Evidence
- VS Code has Go to Implementations (Cmd+F12) and Rider has Go to Implementation (Ctrl+Alt+B / Cmd+Alt+B), both on interface and abstract members and on the types themselves.
- The language servers TuiCode already offers answer it through LSP
textDocument/implementation: gopls documents it, and csharp-ls added it. TuiCode sends onlydefinition,references,hoveranddocumentSymboltoday (src/TuiCode.Workbench/Languages/LanguageServer.cs). - Go to definition (#454), Find usages (#455), library source (#603) and Go to type (#649) have all shipped, so the picker and References tab this needs largely exist.
Why it fits
Theme 3, Code intelligence: "language-aware navigation such as find-usages". The vision's user spends most of their time "navigating code bases ... and trying to understand existing/new code", and interfaces are where text navigation fails them. It is small: one more request to the server they already run, shown the way Go to definition already shows several answers.
Activity
a-team-app commentedon Nov 15, 2026
Recommended: High · theme 3, small · the one navigation hop interface-heavy code needs that Go to definition and Find usages don't make; one more request to servers already running
a-team-app commentedon Nov 17, 2026
Pitched now: a slot was free. I checked it against main as it is today, with Underline problems (#690) and Go to type (#656) merged, and nothing in it changed.
Ctrl+G Candgciare both still free.jamescrosswell commentedon Nov 18, 2026
Let's just call it Go to implementation with the mnemonic
giand a binding ofCtrl + G I.Change quick info to
qiand change quit toqtjamescrosswell commentedon Nov 18, 2026
Actually, leave the mnemonic for Quit as
q... that means someone has to pressq Enterto quit.a-team-app commentedon Nov 18, 2026
Done. The pitch now says:
gi,Ctrl+G I.qiandCtrl+G Q. I picked the key to match the mnemonic; say if you'd like another.q. TodayEnterin the leader only runs the last match left, soq Enterwould do nothing whileqiexists. The pitch now hasEnterrun whatever complete mnemonic you've typed. Typingqalone stops quitting at once.I've recorded the
q/qipair as a named exception to your prefix-free rule (#237), not a change to it. It's still in Pitched for you to approve.jamescrosswell commentedon Nov 18, 2026
The mnemonics were only ever supposed to trigger if/when the combination of keys that someone pressed could only possibly identify a single command... as long as it was ambiguous, more keys are required. In this case (a mnemonic which has been completely entered, but forms a substring of anothe mnemonic) enter is required to 'send/trigger' the mnemonic. That's always now they were supposed to work... can you ensure this is how they work currently?
a-team-app commentedon Nov 18, 2026
Checked main. Half of it works that way today:
qwould wait whileqiexists.Enteronly runs the single row still listed. Withqandqiboth listed,q Enterdoes nothing. This has never shown, because a test forbids any mnemonic from starting another.I've changed the pitch so this PR fixes
Enter: it runs the complete mnemonic you've typed, even when a longer one starts with it. That test changes to check every mnemonic can be reached.I recorded your rule in the register. It replaces the "no mnemonic may be a prefix of another" half of what you said on #237 (26 Sep), and my earlier note on this pitch that treated
q/qias an exception.It stays in Pitched for your go-ahead.
a-team-app commentedon Nov 19, 2026
Broken down into one task: #699, Go to implementation (
gi,Ctrl+G I), with Quick info's move toqi/Ctrl+G QandEnterrunning a complete mnemonic likeq.It runs alongside #697 (Rename symbol): both add a request to the language server, but they only brush shared files.
Nothing in Assumed was left for me to settle; I moved it all to Decided.
a-team-app commentedon Nov 20, 2026
Tried on main at d588308 (#701), with csharp-ls on a small C# project.
Ctrl+G Ion a call to an interface method with two implementations opened Implementations of IStore.Save listing both. On a method with one implementation it jumped straight to it. Closing as done.