Follow-up to Code Editor Implementations (the “word under the cursor” question) — cursor tracking matters because of what should hang off it:
- A menu entry or a (double) left/right click on the name of a function, variable, type or macro jumps to its definition, and/or centres a graph view on it — one graph view of several, since a workspace may show more than one (020: several folders in one graph; a second Graph panel is a later spec).
- The two actions should be separate and both reachable from the same symbol: Go to definition (opens/scrolls the editor) and Show in graph (the graph pans to the node, highlights it, optionally switches to Local mode around it).
What exists (2026-09-21): Workspace::cursor / cursor_word() for both editors (Milestone 14); LSP Go to definition in the CodeMirror editor (Milestone 7, keyboard/menu); the index’s symbol nodes (Defines/Contains edges) for Rust, Julia, Python (spec 022); the Graph panel’s Local mode around the active document; GraphRequest for “draw this”.
What is missing: a symbol → index-node resolution (cursor_word + the document → the Symbol node whose key is <path>#<kind>:<name>@<line>, or by name across the folder when it is a use, not a definition); a Workspace::focus_graph_on(node) request the graph panel answers by centring (and a way to say which graph panel); mouse-button bindings (025); the same for the Rust editor, which has no LSP — there the index is the only source of definitions, which is fine for a first version.
Not implemented — documented for later. Suggested order: (1) focus_graph_on + graph centring, (2) symbol resolution through the index, (3) the context-menu entries and double-click in CodeMirror, (4) the Rust editor.