Code reference detail
definition.rs
crates/reqlan-lsp/src/analysis/definition.rs
| Idea | Status | Tags | Summary | Katz |
|---|---|---|---|---|
| analysis_barrel | The open-buffer analysis of [language_server_rust] is a barrel module. `crates/reqlan-lsp/src/analysis.rs` declares the feature modules and re-exports their surface. It holds no feature logic. Each language feature is one module under `crates/reqlan-lsp/src/analysis/`: - `model`: the parsed open document, its parse inputs, and its name, reference, and token stores. - `text`: span and text primitives shared by all features. - `refs`: the walk over parsed references. - `tokens`: semantic token collection and encoding. - `paths`: authored path location and neighbor file queries. - `diagnostics`: parse, reference, and import errors. - `links`: document links. - `definition`: go-to-definition targets. - `hover`: hover hits. - `references`: highlights, find-references, and rename edits. - `completion`: attribute key and value completion. - `inlays`: inbound referencer hints. - `selection`: expand selection over the parse tree. - `sites`: file, wildcard, and search site payloads for host commands. The barrel is the only surface: other modules import from `crate::analysis`, not from the feature modules. Feature modules share no state beyond the document model. Each feature module carries `rq:[...]` backlinks to the ideas it implements; the barrel header carries the links for the whole concern. Related: [language_server_rust], ["./open-file-sequencing.rq".open_file_algorithm]. | 0.041 | ||
| editor_reference_activation | done | A file reference and an idea reference have no underline in the resting editor. The editor shows an underline when the user holds Ctrl and the pointer is on that reference. Ctrl + click follows the reference in the active editor. A target in the open file moves the cursor in that editor. A target in another file opens in the active editor group. The editor does not open a second copy of the current file. The editor does not open a browser page for a file or idea reference. Alt + Left is Go Back ( `workbench.action.navigateBack` ). Alt + Right is Go Forward ( `workbench.action.navigateForward` ). Those commands walk one editor stack for every language. A definition result is a location. The editor applies that location and records the jump. A later editor, such as a TypeScript file, stays on that stack between the reference and the target. Go Back returns to the previous entry. Go Forward walks those entries toward the newest one. The extension returns the location and leaves the caret move to the editor. Jumps that start in a comment-reference host use this same editor stack ( ["../comment-references/functional-code-comment-references.rq".comment_reference_navigate_back] ). Definition targets prefer an open workspace tab URI so Cursor does not open a detached file copy. The definition target range must move the caret ( not an empty 0: 0 – 0: 0 range ). A click that is already on the declaration name is not a JUMP. The TextMate scope is `meta.link.reqlan`. A `markup.underline` scope forces an underline in the resting editor. `.rq` file and idea references omit `markup.underline` — no resting underline. Comment `rq:[…]` sites add `markup.underline` via the comment injection grammar ( ["../comment-references/functional-code-comment-references.rq".comment_reference_resting_underline] ). A file document link is always underlined, and its `#L` URI opens another editor. The extension does not give the editor a file document link. Ctrl + hover uses the definition request. That request is [reference_goto_definition_speed]. The interactive underline is the lexer token under the cursor: the path string or the idea id from the parser. Definition returns `LocationLink.originSelectionRange` for that token so the editor does not invent a word from brackets or quotes. Path segment names inside a quoted path are not reference tokens. The host does not register a DefinitionProvider for other languages, and does not rescan open source files for this activation. When the engine is rust, the client syncs. rq files. The rust client syncs other files only when the text contains `rq:`. The rust client does not sync blocklisted languages. Definition navigates resolved `rq:[…]` sites ( ["../comment-references/functional-code-comment-references.rq".references_in_functional_code_comments], ["../comment-references/functional-code-comment-references.rq".comment_reference_language_blocklist] ). A web URL and a command link ( folder, wildcard ) stay document links. A click on a web URL opens that URL in the browser. Related: [reference_document_links], [non_web_reference_navigation], [reference_goto_definition_speed]. | 0.232 | |
| non_web_reference_navigation | done | Non-web references ( idea brackets / wikilinks, local file paths, import paths ) must be Ctrl + click navigable via document links and / or go-to-definition. Built-in http ( s ) link detection is not enough. The rust engine builds same-file links and import-target links on the open path ( ["../../../language/syntax.rq".open_file_reference_sequencing], ["../support/open-file-sequencing.rq".outbound_one_hop] ). When the engine is node, idea underlines use the path-local Rust extract ( ["../../../indexer/indexer.rq".local_symbolic_analysis] ), and go-to-definition uses Langium when the idea ref is already linked. Qualified-reference idea lines follow ["../support/open-file-sequencing.rq".lazy_features_after_outbound]. Related: [reference_document_links], [reference_goto_definition_speed], [reference_underline_syntax_align], ["../../../language/syntax.rq".open_file_reference_sequencing]. | 0.136 | |
| reference_goto_definition_speed | done | 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 ["./features-syntax.rq".idea_content_tooltip] is on. A request does not wait behind the confirm pass of ["../support/open-file-sequencing.rq".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], ["../../../language/imports.rq".wildcard_references_webview]. | 0.160 |
Reference labels
"../../../../crates/reqlan-lsp/src/analysis/definition.rs"