Idea detail
configuration_import_root_alias
reqlan rq/language/imports.rq:68
Summary
An 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_import_roots in the applying `.reqlan/config.json` from 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. Completion: code_completion.
Attributes
Ancestor context
Import path strings may use relative paths such as. / exampleimport. rq. Import path strings may use paths containing folders. Import path strings may use remote urls such as https: / / company. com / reqs / style. rq. Import path strings may use an import-root alias shorthand such as `@/path/relative/to/import/root`; see [configuration_import_root_alias]. Path forms apply to from-import, namespace import, and qualified import; see [import_from], [import_namespace], and [import_qualified]. Editor completion for path strings is covered by ["../extension/syntax/features-syntax.rq".code_completion].
import_fromFrom-import syntax uses from, a quoted path, import, and an idea name. From-import may include an alias using as.
import_namespaceNamespace import syntax uses import and a quoted path. Namespace import may include an alias using as. A bracket reference to the alias alone — for example [context_model] — opens the imported file and links only the alias name, like an ideaset namespace. Qualified references through the alias — for example [context_model.builder] — resolve ideas from the imported module.
import_qualifiedQualified import syntax uses import, a quoted path, a dot, an ideaset name, a dot, and an idea name. Qualified import may include an alias using as.
| Kind | Idea | Path | Snippet |
|---|---|---|---|
| references | import_paths | reqlan rq/language/imports.rq | configuration_import_root_alias |
| Kind | Idea | Path | Snippet |
|---|---|---|---|
| references | code_completion | code_completion | |
| references | configuration_import_roots | configuration_import_roots | |
| references | configuration_location | configuration_location |
Initialising graph…