Idea detail
configuration_import_roots
reqlan rq/extension/configuration.rq:31
Summary
`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 `@` 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: import_paths and configuration_import_root_alias.
Schema: configuration_schema_file. Applying file discovery: configuration_location.
Editor completion of aliased import paths: code_completion.
Attributes
Ancestor context
The machine-readable JSON Schema for `.reqlan/config.json` is ["../../packages/extension/schemas/config.schema.json"]. The extension contributes that schema for `**/.reqlan/config.json` via `jsonValidation` in ["../../packages/extension/package.json"]. `.reqlan/config.json` is a JSON object. Unknown properties are not part of the schema and are ignored when loading.
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. Implemented by ["../../packages/language/src/reqlan-path-resolve.ts"].
| Kind | Idea | Path | Snippet |
|---|---|---|---|
| references | configuration_location | reqlan rq/extension/configuration.rq | configuration_import_roots |
| Kind | Idea | Path | Snippet |
|---|---|---|---|
| references | code_completion | code_completion | |
| references | configuration_import_root_alias | configuration_import_root_alias | |
| references | import_paths | import_paths |
Initialising graph…