Code reference detail
comment-reference-path-context.ts
packages/extension/src/extension/comment-reference-path-context.ts
| Idea | Status | Tags | Summary | Katz |
|---|---|---|---|---|
| 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_location | An 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_alias | done | Qualified 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 | |
| references_in_functional_code_comments | done | Comments 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_support | The 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_features | The 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 | ||
| comment_reference | done | Reqlan 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 | |
| file_suffix | Reqlan requirement documents use the. rq file suffix. | 0.052 | ||
| comment_reference | done | Inbound ["./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_reference | done | Idea-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/extension/src/extension/comment-reference-path-context.ts", "../../../packages/extension/src/extension/comment-reference-path-context.ts", "../../packages/extension/src/extension/comment-reference-path-context.ts", "../packages/extension/src/extension/comment-reference-path-context.ts", ../../../../packages/extension/src/extension/comment-reference-path-context.ts, ../../../packages/extension/src/extension/comment-reference-path-context.ts, ../../packages/extension/src/extension/comment-reference-path-context.ts, ../packages/extension/src/extension/comment-reference-path-context.ts