Code reference detail
local-symbolic-links.test.ts
packages/language/test/local-symbolic-links.test.ts
| Idea | Status | Tags | Summary | Katz |
|---|---|---|---|---|
| missing_reference_colour_sequence | done | Paint links and errors in two steps. The hot path paints same-file names and import targets ( [outbound_one_hop] ). The background pass paints qualified-reference idea lines ( [lazy_features_after_outbound] ). Related: [unresolved_reference_diagnostics], [reference_rendering], [file_reference_errors], [import_does_not_exist_error]. Hot path: - URL references: document link, no error. - Wildcard references: document link, no error underline for zero matches. - Import path missing: error underline, no document link. - Imported idea present: document link to that idea line. - Imported idea missing: error underline, no document link. - Same-file idea missing: error underline, no document link. - Qualified reference: document link to the file from the path token. Do not underline a missing idea yet. Background pass: - Qualified idea present: document link to that idea line. - Qualified idea missing: error underline, and remove the document link. - Drop a false missing-idea error only for the range that this pass confirms. Keep a different missing name on the same line. | 0.153 | |
| open_file_algorithm | done | When 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 | |
| aliased_from_import_ctrl_click | done | A from-import alias that contains the imported idea name as a suffix or substring must offer one Ctrl + click destination for the whole written alias. Example: `from "@/_charter/plant-ontology.rq" import simulation as ontology-simulation` then `[ontology-simulation]`. The document-link underline must cover `ontology-simulation`, not only `simulation`. Ctrl + click on any character of that alias must open the imported idea in the import-root target file. Do not resolve the import path a second time against the current file directory. Do not offer a second interactive link on the original idea-name suffix. Related: [reference_document_links], [reference_underline_syntax_align], [non_web_reference_navigation], ["../../../language/imports.rq".import_from], ["../../../language/imports.rq".configuration_import_root_alias]. | 0.086 | |
| complementary_information_rendering | The 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 | ||
| non_web_reference_navigation | done | Non-web references ( idea brackets / wikilinks, local file paths, import paths ) must be Ctrl + click navigable via document links and / or go-to-definition. Built-in http ( s ) link detection is not enough. The rust engine builds same-file links and import-target links on the open path ( ["../../../language/syntax.rq".open_file_reference_sequencing], ["../support/open-file-sequencing.rq".outbound_one_hop] ). When the engine is node, idea underlines use the path-local Rust extract ( ["../../../indexer/indexer.rq".local_symbolic_analysis] ), and go-to-definition uses Langium when the idea ref is already linked. Qualified-reference idea lines follow ["../support/open-file-sequencing.rq".lazy_features_after_outbound]. Related: [reference_document_links], [reference_goto_definition_speed], [reference_underline_syntax_align], ["../../../language/syntax.rq".open_file_reference_sequencing]. | 0.163 | |
| reference_document_links | done | Bracket and wikilink idea references — both same-file and cross-file — must emit a document link so the editor can follow them the same way as file-path references. Editor activation is [editor_reference_activation]. All resolved `LocalReference` and `QualifiedReference` idea / ideaset tokens should emit links targeting the declaration name, regardless of whether the target lives in the same file or an imported one. Namespace-import alias tokens ( `[alias]` → file ) keep their existing file-target link. Each link must include a `target` and a `tooltip` so VS Code does not show " Loading... ". Implemented by ["../../../../packages/language/src/reqlan-file-link-resolver.ts"] ( `resolveIdeaReferenceLinks`, `collectFileLinks` ) and ["../../../../packages/language/src/reqlan-document-link-provider.ts"]. | 0.124 | |
| reference_underline_syntax_align | done | Idea document-link and error underlines must cover the same UTF-16 range as the syntax token ( Langium `$refNode` / semantic token ), including when non-ASCII text appears earlier in the file. Native extract spans are UTF-8 byte offsets ( ["../../../indexer/indexer.rq".local_symbolic_analysis] ); LSP `Position.character` is UTF-16. Convert before `positionAt` so the underline does not drift off the token. Related: [non_web_reference_navigation], [reference_document_links], [unresolved_reference_diagnostics], [aliased_from_import_ctrl_click]. | 0.125 | |
| unresolved_reference_diagnostics | in-progress | Unresolved idea references must report a linking error diagnostic. A same-file miss and an import-target miss have an error and no document link. A qualified reference may link to its file before the idea line is confirmed. After confirmation, a missing idea has an error and no document link ( ["../support/open-file-sequencing.rq".missing_reference_colour_sequence] ). A false idea link looked like a happy reference while Ctrl + click could not navigate. Missing file references stay on ["./features-syntax.rq".file_references] / ["../support/language-server-errors.rq".file_reference_errors] ( error, no document link ). Related: [reference_rendering], [non_web_reference_navigation]. | 0.117 | |
| definition | The indexer should live in the [core_analysis] module. On-disk schema: [sqlite_schema.ideas_index_sqlite] and [diagnostics_schema.diagnostics_sqlite]. Layout and WAL sidecars: [sidecars.reqlan_directory_layout]. Consumers: [consumers.index_consumers] ( extends [consumption] ). Sequencing and triggers: [sequencing.index_sequencing] ( extends [triggers] ). Cache reuse opportunities: [cache_reuse.index_cache_reuse]. | 0.040 | ||
| local_symbolic_analysis | done | Open-file symbolic analysis must run in Rust on one file only. Input: file URI plus source text ( and optional import-root mappings ). Output: ideas in that file, import binding names in that file, outbound edges with UTF-8 source byte spans, and same-file inbound backlinks ( edges whose target is an idea declared in this file ). Import binding names let a qualified reference name an import alias ( ["../core_analysis/check.rq".check_qualified_missing_idea] ). LSP document-link and error underlines must convert those spans to UTF-16 ( ["../extension/language/syntax/features-syntax-highlighting.rq".reference_underline_syntax_align] ). Cross-file inbound still comes from SQLite via ["./cache-reuse.rq".unify_inbound_indexes]. Do not read SQLite. Do not walk other workspace documents. Do not load an idea catalog. The open-buffer model is ["../extension/language/support/open-file-sequencing.rq".ast_lifecycle]. The hot path parses this buffer once. It does not run this extract as a second parse. Import-target confirmation is a separate depth-1 parse ( ["../extension/language/support/open-file-sequencing.rq".outbound_one_hop] ). That parse is not this extract. The language server caches the open buffer by URI plus text fingerprint ( ["../extension/language/support/open-file-sequencing.rq".open_file_hot_path] ). Wildcard forms stay one `wildcard_reference` pattern edge ( unresolved ); sync still expands them later via [wildcard_reference_edges]. Flag: `ExtractOptions.local_symbolic` forces an empty candidate list. CLI: ["../cli/cli_package.rq".commands] `analyse --local-symbolic <file>`. Sidebar: ["../extension/local-context/activitybar-panels/current_context_scope.rq".reference_lists_pane] merges live same-file inbound / outbound with indexed refs ( [local_symbolic_sidebar] ). Related: ["../language/syntax.rq".open_file_reference_sequencing], [index], ["./cache-reuse.rq".unify_inbound_indexes]. | 0.387 | |
| import_from | From-import syntax uses from, a quoted path, import, and an idea name. From-import may list more than one idea. Separate the names with commas. From-import may include an alias using as. The parser records a span for the path, each idea name, and each alias. Each of those tokens is its own document link. The path links to the file. An idea name links to that declaration. An alias links to the same declaration. When the alias contains the imported idea name, Ctrl + click on a bracket reference still treats the whole alias as one link. See ["../extension/language/syntax/features-syntax-highlighting.rq".aliased_from_import_ctrl_click]. The language server uses the parser spans: ["../extension/language/support/language-server-rust.rq".language_server_rust]. | 0.220 | ||
| import_keywords | The 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 |
Reference labels
"../../../../packages/language/test/local-symbolic-links.test.ts:aliased from-import whose name contains the imported idea is one link", "../../../../packages/language/test/local-symbolic-links.test.ts:idea underlines match syntax tokens after non-ASCII text", "../../../../packages/language/test/local-symbolic-links.test.ts:same-file idea links without DocumentBuilder / workspace link", "../../../../packages/language/test/local-symbolic-links.test.ts:unresolved same-file ideas get no document link", "../../packages/language/test/local-symbolic-links.test.ts:aliased from-import whose name contains the imported idea is one link", "../../packages/language/test/local-symbolic-links.test.ts:idea underlines match syntax tokens after non-ASCII text", "../../packages/language/test/local-symbolic-links.test.ts:same-file idea links without DocumentBuilder / workspace link", ../../../../packages/language/test/local-symbolic-links.test.ts:aliased from-import whose name contains the imported idea is one link, ../../../../packages/language/test/local-symbolic-links.test.ts:idea underlines match syntax tokens after non-ASCII text, ../../../../packages/language/test/local-symbolic-links.test.ts:same-file idea links without DocumentBuilder / workspace link, ../../../../packages/language/test/local-symbolic-links.test.ts:unresolved same-file ideas get no document link, ../../packages/language/test/local-symbolic-links.test.ts:aliased from-import whose name contains the imported idea is one link, ../../packages/language/test/local-symbolic-links.test.ts:idea underlines match syntax tokens after non-ASCII text, ../../packages/language/test/local-symbolic-links.test.ts:same-file idea links without DocumentBuilder / workspace link