Printable idea sheet
reference_goto_definition_speed
reqlan rq/extension/language/syntax/features-syntax-highlighting.rq:296
Katz 0.179
Hover and go-to-definition are lookups on the open parse.
The parse keeps its references sorted by start byte. A request finds the reference under the cursor by binary search.
A request does not walk the syntax tree and does not convert each reference to a line and column.
A request resolves each authored path once per parse. It does not `stat` that path again.
A same-file idea uses that parse.
An open neighbor uses that neighbor's buffer.
A closed neighbor is parsed once. The server keeps its model, idea names, and name-token ranges.
A later request does one `stat`. It reads and parses the file again only when the modified time or the size changed.
A hover on a cross-file idea renders from that cached model. It does not read the file.
The target is the name token of the idea, in the open editor when the target is open.
An imported alias such as `other` reaches the imported idea.
A folder reference has no definition. Its link is the folder-picker command.
A hover renders idea content only when idea_content_tooltip is on.
A request does not wait behind the confirm pass of lazy_features_after_outbound.
The editor calls this request on Ctrl + hover.
The extension does not send the document text from that handler.
The extension does not open a folder picker or a wildcard panel from that handler.
A folder click and a wildcard click use the command document link.
When the engine is node, the provider uses cached Langium ref objects for idea tokens.
It does not scan the document text when the CST already covers the cursor.
Related: editor_reference_activation, wildcard_references_webview.
- implementation
- session.rs, analysis.rs, server.rs, main.ts, register-folder-reference-handling.ts, register-wildcard-reference-handling.ts, reqlan-definition-provider.ts, reqlan-markdown-links.ts
- status
- done
- tests
- session.rs:definition_uses_the_open_neighbor_parse, session.rs:definition_follows_a_changed_neighbor_to_the_name_token, session.rs:definition_of_an_imported_alias_reaches_the_neighbor, session.rs:folder_reference_link_is_a_command, hover_content.rs:hover_shows_idea_content_from_another_file, stdio.rs:stdio_initialize_and_shutdown, editor-link-activation.test.ts:go-to-definition does not send the buffer
Interactive page: reference_goto_definition_speed