Referenced by16
Labels44

Referencing ideas

IdeaStatusTagsSummaryKatz
configuration_import_roots`importRoots` is an optional array of alias-to-directory mappings in `.reqlan/config.json`. Each mapping has: - `alias` ( required non-empty string ): prefix before `/` in aliased import paths. - `root` ( optional non-empty string ): directory for that alias. A relative `root` resolves against the base root ( the parent of `.reqlan` ), not against the `.reqlan` directory. An absolute path or `file://` URI is used as that alias' import-root directory directly. When `root` is omitted for a mapping, that alias uses the workspace folder that contains the `.rq` file. When `importRoots` is omitted, empty, or has no valid entries, the default is one mapping with alias `importRootAlias` from ["../../../packages/analytical/src/core/defaults.json"] and no explicit root. When several aliases could match a path, the longest alias wins. Invalid or unreadable JSON, and a non-array `importRoots` value, fall back to defaults ( or no loaded config for discovery, then defaults at resolve time ). Language path forms and `@/` shorthand: ["../../language/imports.rq".import_paths] and ["../../language/imports.rq".configuration_import_root_alias]. Comment references in source files use the same mappings: ["../language/comment-references/functional-code-comment-references.rq".comment_reference_import_root_alias]. Schema: [configuration_schema_file]. Applying file discovery: [configuration_location]. Editor completion of aliased import paths: ["../language/syntax/features-syntax.rq".code_completion].0.167
configuration_locationAn optional `.reqlan/config.json` may appear under a base's `.reqlan` directory. For a given `.rq` file, the applying base is the nearest ancestor directory that owns a `.reqlan` folder. The applying config is that base's `.reqlan/config.json` when present. If the owning base has no `config.json`, or no owning base is found, defaults from [configuration_import_roots] apply. A child base does not inherit a parent base's config.0.190
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
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
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
comment_supportThe extension should recognise reqlan references embedded in comments of arbitrary source files. Comment reference syntax should follow the form rq, then a quoted path, then a dotted idea name in line comments. Qualified comment paths must resolve import-root aliases such as `@/` the same way imports do — ["../../../language/imports.rq".configuration_import_root_alias], ["../comment-references/functional-code-comment-references.rq".comment_reference_import_root_alias]. Comment references in non-. rq files should support syntax highlighting ( resting underline: ["../comment-references/functional-code-comment-references.rq".comment_reference_resting_underline] ), hover, and go-to-definition. Arbitrary file references should be supported from both. rq files and comment references.0.059
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
configuration_import_root_aliasAn import path may start with an alias string, then `/`, then a relative path under that alias's import-root directory. Default alias string: `@`, written as `@/` plus a path relative to the import root. Default import-root directory: the workspace folder that contains the `.rq` file ( not the document directory ). The path after `/` is joined to that alias's import-root directory; the alias itself must be followed by `/` ( e. g. `@reqs` is not aliased ). Alias strings and import-root directories are configured as [configuration.configuration_import_roots] in the applying `.reqlan/config.json` from [configuration.configuration_location]. A configured relative `root` resolves against the base root ( parent of `.reqlan` ); an omitted `root` keeps the workspace-folder default. When several configured aliases could match a path, the longest alias wins. Related path forms: [import_paths], ["../extension/language/comment-references/functional-code-comment-references.rq".comment_reference_import_root_alias]. Completion: ["../extension/language/syntax/features-syntax.rq".code_completion]. File references and the language server use the same locate rule as ["../core_analysis/check.rq".check]: load `importRoots` from the applying `.reqlan/config.json` for the source file ( [configuration.configuration_location] ), then `resolve_rq_path` and join the workspace when the result is relative — including paths with spaces such as `["@/my file.ts"]`.0.296
import_keywordsThe keywords import, from, and as are reserved for import statements. Import keywords may also appear as ordinary words in idea body text when not at statement start.0.047
comment_referencedoneReqlan references may appear in line comments of arbitrary source files. Comment reference syntax is `rq:[idea]` or `rq:["path".idea]` ( quoted path, optional extra qualification ). Qualified paths use the same path forms as imports, including import-root aliases such as `@/` — ["imports.rq".configuration_import_root_alias], ["../extension/language/comment-references/functional-code-comment-references.rq".comment_reference_import_root_alias]. Discovery skips quoted strings, including Rust raw strings ( `r#"…"#`, `r##"…"##`, `br#"…"#` ), so `rq:[…]` text in a string is not a live comment. Editor language coverage is a blocklist, not an allowlist: ["../extension/language/comment-references/functional-code-comment-references.rq".comment_reference_language_blocklist]. Indexed as `comment_link` by ["../indexer/indexer.rq".index_code_files]. Unresolved targets: [comment_reference_resolution_error]. Indexer listing: ["../core_analysis/core.rq".test_references]. Refactors: ["../extension/mutation/refactor_support.rq".comment_reference_refactor_support].0.365
comment_reference_resolution_errordoneIf a comment reference cannot be resolved, show it as an error diagnostic. Do not create a document link to a missing file ( that underline then raises a generic cannot-find-file editor error ). Related: [comment_reference], [comment_reference_ignore], ["../reference_types.rq".comment_reference], ["../extension/language/comment-references/functional-code-comment-references.rq".references_in_functional_code_comments].0.151
file_suffixReqlan requirement documents use the. rq file suffix.0.052
comment_referencedoneInbound ["./ontology.rq".reference] from comments in non- `.rq` source: `rq:[idea]` / `rq:["path".idea]`. Qualified paths may use import-root aliases ( `rq:["@/path".idea]` ) per ["./language/imports.rq".configuration_import_root_alias] and ["./extension/language/comment-references/functional-code-comment-references.rq".comment_reference_import_root_alias]. Spec: ["./extension/language/comment-references/functional-code-comment-references.rq".references_in_functional_code_comments] Syntax note: ["./language/syntax.rq".comment_reference]. Resolve: [comment_resolver]. Unresolved: ["./language/syntax.rq".comment_reference_resolution_error]. Index edge kind `comment_link`. Related capture of those files: ["./ontology.rq".referenced_files]. Indexer: ["./indexer/indexer.rq".index_code_files].0.119
idea_referencedoneIdea-to-idea ["./ontology.rq".reference]: bracket `[name]` / `[ideaset.name]` targets a local, imported, or same-file idea. Syntax: ["./language/syntax.rq".reference_brackets], ["./language/syntax.rq".same_file_reference], ["./language/syntax.rq".reference_qualified], ["./language/syntax.rq".reference_embedding], ["./language/syntax.rq".references_to_subidea]. Index edge kind `references` on [analytical_types] / [rust_index_types]. Extract: [idea_extractor], [rust_extract]. A `[ideaset.member]` form records the edge on the member leaf, not on the ideaset container. An attribute uses the same brackets. See ["./language/syntax.rq".attribute_namespacing]. Wikilink surface for the same edge kind: [link_reference]. Fan-out across files: [wildcard_reference].0.125

Reference labels

"../../../../packages/language/test/comment-reference-resolution.test.ts:accepts an import-root aliased comment reference in a loaded document", "../../../../packages/language/test/comment-reference-resolution.test.ts:clears the underline and creates a link after a matching idea is added", "../../../../packages/language/test/comment-reference-resolution.test.ts:creates a document link for an import-root aliased comment reference", "../../../../packages/language/test/comment-reference-resolution.test.ts:does not treat @/ as a path relative to the source file", "../../../../packages/language/test/comment-reference-resolution.test.ts:publishes a missing-idea diagnostic and no document link until the idea exists", "../../../../packages/language/test/comment-reference-resolution.test.ts:relinks comment references only when the target file changes", "../../../../packages/language/test/comment-reference-resolution.test.ts:reports a missing comment reference idea in a loaded file", "../../../../packages/language/test/comment-reference-resolution.test.ts:resolves a configured alias in a comment reference", "../../../../packages/language/test/comment-reference-resolution.test.ts:revalidates comment-reference underlines when a matching idea is created on disk", "../../../../packages/language/test/comment-reference-resolution.test.ts:shares one presentation so a matching idea clears the underline and adds a link", "../../../packages/language/test/comment-reference-resolution.test.ts:creates a document link for an import-root aliased comment reference", "../../packages/language/test/comment-reference-resolution.test.ts", "../../packages/language/test/comment-reference-resolution.test.ts:accepts a resolved comment reference in a loaded document", "../../packages/language/test/comment-reference-resolution.test.ts:creates a document link for an import-root aliased comment reference", "../../packages/language/test/comment-reference-resolution.test.ts:creates a document link when the comment reference file and idea exist", "../../packages/language/test/comment-reference-resolution.test.ts:does not create a document link for a missing comment reference file", "../../packages/language/test/comment-reference-resolution.test.ts:reports a missing comment reference file in a loaded document", "../../packages/language/test/comment-reference-resolution.test.ts:reports a missing comment reference idea in a loaded file", "../../packages/language/test/comment-reference-resolution.test.ts:reports an error when a comment reference file does not exist", "../../packages/language/test/comment-reference-resolution.test.ts:reports an error when the comment reference idea is missing from the file", "../../packages/language/test/comment-reference-resolution.test.ts:suppresses comment reference errors on the line after //rq-ignore-error", "../packages/language/test/comment-reference-resolution.test.ts:creates a document link for an import-root aliased comment reference", ../../../../packages/language/test/comment-reference-resolution.test.ts:accepts an import-root aliased comment reference in a loaded document, ../../../../packages/language/test/comment-reference-resolution.test.ts:clears the underline and creates a link after a matching idea is added, ../../../../packages/language/test/comment-reference-resolution.test.ts:creates a document link for an import-root aliased comment reference, ../../../../packages/language/test/comment-reference-resolution.test.ts:does not treat @/ as a path relative to the source file, ../../../../packages/language/test/comment-reference-resolution.test.ts:publishes a missing-idea diagnostic and no document link until the idea exists, ../../../../packages/language/test/comment-reference-resolution.test.ts:relinks comment references only when the target file changes, ../../../../packages/language/test/comment-reference-resolution.test.ts:reports a missing comment reference idea in a loaded file, ../../../../packages/language/test/comment-reference-resolution.test.ts:resolves a configured alias in a comment reference, ../../../../packages/language/test/comment-reference-resolution.test.ts:revalidates comment-reference underlines when a matching idea is created on disk, ../../../../packages/language/test/comment-reference-resolution.test.ts:shares one presentation so a matching idea clears the underline and adds a link, ../../../packages/language/test/comment-reference-resolution.test.ts:creates a document link for an import-root aliased comment reference, ../../packages/language/test/comment-reference-resolution.test.ts, ../../packages/language/test/comment-reference-resolution.test.ts:accepts a resolved comment reference in a loaded document, ../../packages/language/test/comment-reference-resolution.test.ts:creates a document link for an import-root aliased comment reference, ../../packages/language/test/comment-reference-resolution.test.ts:creates a document link when the comment reference file and idea exist, ../../packages/language/test/comment-reference-resolution.test.ts:does not create a document link for a missing comment reference file, ../../packages/language/test/comment-reference-resolution.test.ts:reports a missing comment reference file in a loaded document, ../../packages/language/test/comment-reference-resolution.test.ts:reports a missing comment reference idea in a loaded file, ../../packages/language/test/comment-reference-resolution.test.ts:reports an error when a comment reference file does not exist, ../../packages/language/test/comment-reference-resolution.test.ts:reports an error when the comment reference idea is missing from the file, ../../packages/language/test/comment-reference-resolution.test.ts:suppresses comment reference errors on the line after //rq-ignore-error, ../packages/language/test/comment-reference-resolution.test.ts:creates a document link for an import-root aliased comment reference