Referenced by16
Labels36

Referencing ideas

IdeaStatusTagsSummaryKatz
comment_reference_import_root_aliasdoneQualified comment references use the same path forms as imports, including import-root aliases such as `@/`. `rq:["@/path/relative/to/import/root.rq".idea]` resolves against the alias's import-root directory ( workspace folder by default ), not the source file directory. `@reqs` without a following `/` is not an alias. Configured aliases and roots follow ["../../../language/imports.rq".configuration_import_root_alias] and ["../../host/configuration.rq".configuration_import_roots]. The language server applies this when resolving comment references in `.rq` files. The extension applies the same core resolver for `rq:[…]` links in non- `.rq` source. Related: ["../../../language/syntax.rq".comment_reference], [references_in_functional_code_comments], ["../../../language/imports.rq".import_paths].0.235
comment_reference_resolution_error_statedone[comment_reference_resolution_error] The language server must share one resolution result for clickable links and the error underline. Resolve comment references once against the loaded idea index, then reuse that result for both consumers. When you create an idea that matches a comment reference, the language server must clear the underline and the missing-idea message. Resolution and the index should be performed once and shared between consumers.0.053
references_in_functional_code_commentsdoneComments in functional code should be able to reference reqlan ideas using the an `rq:` prefixed to an idea: `rq:[idea]` as demonstrated in python, but actually applicable to any language's comment context: Editor hosts are every language except [comment_reference_language_blocklist]. With the rust language server, a resolved `rq:[…]` site is Ctrl + click navigable via go-to-definition. File document links stay out of the editor ( ["../syntax/features-syntax-highlighting.rq".editor_reference_activation] ). Comment `rq:[…]` sites use TextMate `meta.link.reqlan markup.underline` so the resting editor shows they are link-shaped ( [comment_reference_resting_underline] ). After that goto, Alt + Left restores the comment-host caret ( [comment_reference_navigate_back] ). Missing ideas keep the error underline and have no definition target. Relates to ["../../mutation/refactor_support.rq".comment_reference_refactor_support], [comment_reference_import_root_alias], ["../support/language-server-rust.rq".language_server_rust], ["../syntax/features-syntax-highlighting.rq".editor_reference_activation].0.300
language_server_rustin-progressA Rust binary replaces the Langium language-server process. The extension launches `reqlan-lsp` over stdio. Open `.rq` buffers parse with [parser_rust]. The open sequence is ["open-file-sequencing.rq".open_file_algorithm]. Workspace names and rename targets come from the ideas index under [application_memory]. Inbound hints wait for the host snapshot of that index. The inbound inlay hover is markdown. It lists each referencer as a file link. An idea hover shows styled idea content when ["../syntax/features-syntax.rq".idea_content_tooltip] is on. A closed file has no retained syntax tree. Go-to-definition cost is ["../syntax/features-syntax-highlighting.rq".reference_goto_definition_speed]. When the engine is `rust`, the server also serves `rq:[…]` document links, go-to-definition, and missing-idea diagnostics in non- `.rq` comments. One resolution supplies the link, the definition target, and the underline. The host strips file document links; Ctrl + click uses definition ( ["../syntax/features-syntax-highlighting.rq".editor_reference_activation] ). The host serves those links when the engine is `node`. Host commands prefer LSP custom requests, napi extract, and the ideas index. Move / delete planners still use Langium until index-backed planners land. The setting `reqlan.languageServer.engine` selects the binary. The default is `rust`. `node` remains only when the setting says so, or when the binary is not on disk yet. A local extension build compiles this binary with the napi addon ( [extension_host_native_stage] ). The extension launches `bin/reqlan-lsp`, else that release build. It never launches a debug build, because a debug build is slow and the extension build does not refresh it. Code actions match ["../vsc-primitives.rq".code_actions]: ignore, create below, import fixes, search or wrap, idea move and delete, and barrel page. Attribute and name catalogs drive completion. Rename and find-references use open buffers plus the ideas index. Inlay hints honour `reqlan.referencesInlayHints.enabled` and the host inbound snapshot. An import link uses the parser token span ( [import_from] ). The path links to the file. An imported idea name and its alias each link to that declaration. A namespace reference links the alias and the idea as separate names. A missing leaf reports an unresolved idea on that name. Related: [language_server], [grammar_and_parser], [analytical_rust_port], [vsix_export].0.580
ast_lifecycledoneThe open buffer has one model. That model is the Rust parse of this buffer. [local_symbolic_analysis] is a file-local extract. The hot path does not run it as a second parse. Related: [open_file_algorithm], [open_file_sequence_diagram], [outbound_one_hop], [token_colour_sequence], [parse_budget_timeout], ["./initialisation-and-sequencing.rq".lsp_file_watch], [language_server_rust]. Populate. Parse this buffer when the editor opens it. Semantic tokens, same-file links, and the import list come from that parse. Replace. When this buffer text changes, parse again and replace the model. Do not patch the old model. A watched `.rq` change uses the same replace path ( [document_update_handler] ). When the text is unchanged, keep the current model. Drop. When the editor closes the buffer, drop the model. A closed file keeps no syntax tree ( [language_server_rust] ). Import files. [outbound_one_hop] stores a name list for each imported file. That list is not an open-buffer model. A change to an imported file does not replace this buffer's model. Read the imported file again when its content hash changes. Incomplete parse. When the budget fails, store an empty model plus diagnostics ( [parse_budget_timeout] ). Idea names stay empty until a later successful parse. The node engine follows [node_engine_open_path].0.249
comment_backlink_sequencein-progress`rq:[idea]` and `rq:["path".idea]` in code comments use one resolution for the link and the underline. A qualified path reads that `.rq` file, parses idea names, then links or errors. That read belongs to the comment file. Opening a different `.rq` buffer must not re-resolve every comment buffer. An unqualified name searches open `.rq` buffers first. The index snapshot may add a match later ( [lazy_features_after_outbound] ). Do not call `list_all_ideas` for that search. Do not create a document link when the idea is not confirmed. Related: [comment_reference_resolution_error_state].0.103
lazy_features_after_outbounddoneAfter the hot path is on screen, show the rest when its data is ready. This pass must not delay [open_file_algorithm] steps 1 – 5. Related: [language_server], [unify_inbound_indexes], [background_startup], [inlay_hints], [codelens]. Work: - Confirm each qualified reference. Read that target file once, at depth 1. Then paint the idea line or the missing-idea error ( [missing_reference_colour_sequence] ). - Inbound backlinks: inlay hints and the file-top CodeLens, from the host snapshot ( [unify_inbound_indexes] ). - Attribute and name catalogs for completion and quick fixes. - Unqualified comment matches from that snapshot ( [comment_backlink_sequence] ). Until the first ready snapshot arrives, inlay hints and the file CodeLens stay empty. Those handlers do not open SQLite and do not call `list_all_ideas`. Later updates are incremental ready-state events ( ["../../../indexer/cache-reuse.rq".inbound_snapshot_events] ); last-good stays until replaced. When a ready snapshot arrives, refresh the visible editors.0.283
native_cache_retentiondoneThe language server keeps the open-buffer model for each open editor. It keeps a depth-1 name list for each imported file, and for each qualified-reference file the background pass has confirmed, while an open editor still needs that list. A closed editor drops its model. It also drops name lists that no open editor still needs. A file-watcher delete drops that URI from both caches. A check of a closed file may parse it once. That result is not stored. Related: [open_file_hot_path], [outbound_one_hop], [ast_lifecycle].0.072
open_file_algorithmdoneWhen the editor opens or changes a `.rq` buffer, `reqlan-lsp` runs this sequence. Do not wait for the ideas index. Do not wait for a workspace crawl. Detail: [open_file_sequence_diagram]. Related: [open_file_reference_sequencing], [language_server_rust], [ast_lifecycle], [outbound_one_hop], [open_file_hot_path], [token_colour_sequence], [missing_reference_colour_sequence], [lazy_features_after_outbound]. The hot path finishes before the first diagnostics publish. 1. Parse this buffer once ( [ast_lifecycle] ). 2. Colour tokens from that parse ( [token_colour_sequence] ). 3. Emit same-file links and same-file missing-idea errors from that parse. 4. Parse each imported file once, at depth 1, for idea names and lines ( [outbound_one_hop] ). Link an imported name that exists. Underline an imported name that does not ( [missing_reference_colour_sequence] ). 5. Return. A qualified reference may link to its file from the path token. Do not read that file on this path. After that publish, a background pass fills the rest ( [lazy_features_after_outbound] ). That pass must not delay steps 1 – 5. The server sends the hot publish before it starts that pass. It runs that pass only while no client message waits. A hover or a definition request goes first. A change reuses the import roots loaded at open. It does not read the config again. The node engine keeps [node_engine_open_path].0.330
token_colour_sequencedoneToken colour has two layers. They must not wait for the ideas index. TextMate paints first from the buffer text. Semantic tokens paint from the one parse ( [ast_lifecycle] ). A second extract does not paint tokens. A missing reference keeps the same token colour. The error underline is a diagnostic ( [missing_reference_colour_sequence], [reference_rendering] ). Related: [syntax_highlighting].0.117
complementary_information_renderingThe extension should render computed information inline in the editor as complementary text. Complementary rendering should include resolved references and optionally indirect references behind a toggle. Complementary rendering should not mutate source files unless the user explicitly applies a change.0.040
editor_reference_activationdoneA 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 navigate-back. It restores the caret from before go-to-definition. The extension keeps that JUMP on a reqlan stack because Cursor often skips the editor history entry for same-file definition. The stack also records jumps that start in comment-reference host languages ( ["../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 language-server document selector includes all file-scheme documents except the comment-host blocklist, and 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.254
reference_goto_definition_speeddoneHover 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.179
syntax_featuresThe extension should provide language support for. rq files via the lsp. Syntax features should cover ideas, ideasets, imports, references, attributes, comments, and lists. Broken imports and references should be validated and reported in the editor. Go-to-definition and find-references should work for ideas, imports, and cross-file links. Find-references is served by ["../support/language-server-rust.rq".language_server_rust] ( `textDocument/references` ). Autoformatting should be supported for. rq files.0.046
refactor_changesOn rename, move, or delete of files or symbols, the extension should update the idea index, import statements, embedded file references, comment references, and other idea references that are affected. The index should be resilient to duplication, particularly when ideas move between files: the old hosting file URI must be cleared before or when the destination is reindexed. [refactor_file_moves] [refactor_symbol_rename] [refactor_symbol_move] [refactor_symbol_delete] [comment_reference_refactor_support] Implemented by ["../../../packages/analytical/src/index-store/workspace-index.ts"], ["../../../packages/extension/src/analytical_submodule/index-store/index-service.ts"], ["../../../packages/language/src/reqlan-idea-refactor.ts"], and ["../../../packages/extension/src/mutation_module/register-file-mutation-hooks.ts"].0.114
refactor_symbol_renamedoneSyntactic symbols ( ideas, ideasets, import aliases, and import paths ) should be renamable via the editor rename action ( F2 / LSP rename ). Rename should update AST references across. rq files and matching `rq:["path".idea]` comment idea tokens in source files ( [comment_reference_refactor_support] ). The Rust server renames open buffers, open comment buffers, and closed files reached via the ideas index. Non- `.rq` comment rename stays on the host provider until Rust owns those buffers. [refactor_support] Implemented by ["../../../crates/reqlan-lsp/src/session.rs"], ["../../../packages/language/src/reqlan-rename-provider.ts"], ["../../../packages/language/src/reqlan-comment-rename.ts"], ["../../../packages/language/src/reqlan-name-provider.ts"], and ["../../../packages/extension/src/mutation_module/refactor/register-comment-rename-provider.ts"].0.084

Reference labels

"../../../../crates/reqlan-lsp/tests/session.rs:attribute_catalog_completion_and_find_references", "../../../../crates/reqlan-lsp/tests/session.rs:comment_definition_follows_a_resolved_rq_reference", "../../../../crates/reqlan-lsp/tests/session.rs:comment_links_share_one_resolution", "../../../../crates/reqlan-lsp/tests/session.rs:completion_rename_and_code_action", "../../../../crates/reqlan-lsp/tests/session.rs:definition_does_not_reread_a_cached_neighbor", "../../../../crates/reqlan-lsp/tests/session.rs:definition_follows_a_changed_neighbor_to_the_name_token", "../../../../crates/reqlan-lsp/tests/session.rs:definition_hover_highlight_and_link", "../../../../crates/reqlan-lsp/tests/session.rs:definition_of_an_imported_alias_reaches_the_neighbor", "../../../../crates/reqlan-lsp/tests/session.rs:definition_origin_is_the_lexer_token_under_the_cursor", "../../../../crates/reqlan-lsp/tests/session.rs:definition_uses_the_open_neighbor_parse", "../../../../crates/reqlan-lsp/tests/session.rs:folder_reference_link_is_a_command", "../../../../crates/reqlan-lsp/tests/session.rs:index_completion_inlay_and_custom_requests", "../../../../crates/reqlan-lsp/tests/session.rs:neighbor_confirm_suppresses_missing_idea", "../../../../crates/reqlan-lsp/tests/session.rs:open_file_diagnostics_and_close_drops_the_parse", "../../../../crates/reqlan-lsp/tests/session.rs:rq_ignore_suppresses_the_next_line", "../../../../crates/reqlan-lsp/tests/session.rs:semantic_token_range_matches_the_source_name", "../../../crates/reqlan-lsp/tests/session.rs:attribute_catalog_completion_and_find_references", "../../../crates/reqlan-lsp/tests/session.rs:completion_rename_and_code_action", ../../../../crates/reqlan-lsp/tests/session.rs:attribute_catalog_completion_and_find_references, ../../../../crates/reqlan-lsp/tests/session.rs:comment_definition_follows_a_resolved_rq_reference, ../../../../crates/reqlan-lsp/tests/session.rs:comment_links_share_one_resolution, ../../../../crates/reqlan-lsp/tests/session.rs:completion_rename_and_code_action, ../../../../crates/reqlan-lsp/tests/session.rs:definition_does_not_reread_a_cached_neighbor, ../../../../crates/reqlan-lsp/tests/session.rs:definition_follows_a_changed_neighbor_to_the_name_token, ../../../../crates/reqlan-lsp/tests/session.rs:definition_hover_highlight_and_link, ../../../../crates/reqlan-lsp/tests/session.rs:definition_of_an_imported_alias_reaches_the_neighbor, ../../../../crates/reqlan-lsp/tests/session.rs:definition_origin_is_the_lexer_token_under_the_cursor, ../../../../crates/reqlan-lsp/tests/session.rs:definition_uses_the_open_neighbor_parse, ../../../../crates/reqlan-lsp/tests/session.rs:folder_reference_link_is_a_command, ../../../../crates/reqlan-lsp/tests/session.rs:index_completion_inlay_and_custom_requests, ../../../../crates/reqlan-lsp/tests/session.rs:neighbor_confirm_suppresses_missing_idea, ../../../../crates/reqlan-lsp/tests/session.rs:open_file_diagnostics_and_close_drops_the_parse, ../../../../crates/reqlan-lsp/tests/session.rs:rq_ignore_suppresses_the_next_line, ../../../../crates/reqlan-lsp/tests/session.rs:semantic_token_range_matches_the_source_name, ../../../crates/reqlan-lsp/tests/session.rs:attribute_catalog_completion_and_find_references, ../../../crates/reqlan-lsp/tests/session.rs:completion_rename_and_code_action