Members

IdeaFileStatusSummaryKatz
anonymous_reference_code_completionreqlan rq/extension/language/support/features-imports.rqAnonymous imports should share the same code completion e. g. ["@/reqlan rq/extension/language/syntax/features-syntax.rq"] should complete the same as `import "@/reqlan rq/extension/language/syntax/features-syntax.rq" as code_completion`. they should share the same code and logic0.053
from_import_syntaxreqlan rq/extension/language/support/features-imports.rqMultiple symbols should be allowd to be be imported with `from "path" import symbol1, symbol2, symbol3` syntax. Each imported name is its own link ( ["../../../language/imports.rq".import_from] ).0.040
implicit_file_extensionreqlan rq/extension/language/support/features-imports.rqThe import statements should not require an extension, i. e. it should assume ". rq " unless otherwise specified. An extensionless path resolves to the ". rq " file first, then to a literal extensionless file or folder. A path that already carries any extension is resolved exactly as written. Folder targets: [import_folder_targets].0.195
import_code_completionreqlan rq/extension/language/support/features-imports.rqImport path code completion for `import` / `from` strings ( and shared anonymous paths ). [code_completion] [import_code_completion_explicit_extension] [import_code_completion_path_segments] [import_code_completion_substring_match] [import_code_completion_ranking] [anonymous_reference_code_completion] [import_code_completion_auto_file_import] [import_code_completion_rendering]0.057
import_code_completion_auto_file_importreqlan rq/extension/language/support/features-imports.rqdoneWhen a code completion for an idea in another file is selected, the import should be automatically added to the current file. This prevents the user from selecting a presented idea, and then having to add the import for the same thing. Uses the same from-import insertion as [import_error] quick fixes; skips the edit when the idea is already imported. [reference_code_completion] [import_code_completion] [import_code_completion_rendering] [import_error]0.066
import_code_completion_explicit_extensionreqlan rq/extension/language/support/features-imports.rqCompletions insert paths with an explicit `.rq` extension. [implicit_file_extension] Hand-written imports may still omit the extension; completion prefers the written form with `.rq`.0.047
import_code_completion_path_segmentsreqlan rq/extension/language/support/features-imports.rqIn a folder context, show next path segments ( directories with a trailing `/` ). After `../`, offer `../path/` before nested `../path/file.rq`.0.047
import_code_completion_rankingreqlan rq/extension/language/support/features-imports.rqRank import path completions by directory proximity ( hop count from the completing file's directory to the candidate's directory ), then directories before files, then path alphabetically. Example: typing `../` ranks `../close.rq` before `../../../path.rq`. Emit sortText for that order, and set filterText so the editor does not re-rank by label fuzzy score over proximity.0.053
import_code_completion_renderingreqlan rq/extension/language/support/features-imports.rqdoneReference code completion for ideas from other files shows the relative import path in the completion detail. Same-file ideas omit the path detail. [reference_code_completion] [import_code_completion] [import_code_completion_auto_file_import]0.066
import_code_completion_substring_matchreqlan rq/extension/language/support/features-imports.rqFilter path candidates by search within the path, not only a starts-with prefix. Typing `path` should match `../../parent/path.rq`. Typing `hellopath` should match `../../hello/inbetween/path/file.rq` ( characters matched in order across path segments ).0.047
import_does_not_exist_errorreqlan rq/extension/language/support/features-imports.rqImports show an underline error when the target file or folder does not exist. Imports also show an underline error when a named imported idea does not exist in the target file. An existing folder is not an error: [import_folder_targets]. CI: ["../../../core_analysis/check.rq".check_unresolved_imports]. [general_errors]0.151
import_errorreqlan rq/extension/language/support/features-imports.rqdone" Could not resolve reference " errors offer Quick Fix code actions ( lightbulb and editor right-click Quick Fix ). Fixes: - Add import from a matching idea found in loaded documents or the name catalog pushed from the index - Rewrite the reference to an anonymous qualified form `["path".name]` - Search the index for matching ideas, ideasets, or files ( same `reqlan.searchReference` path as [code_actions] / ["../../host/features-commands.rq".search_code_actions] ), then insert an import - Create the idea in a new. rq file and import it [general_errors] [code_actions] [quick_fixes]0.078
import_folder_targetsreqlan rq/extension/language/support/features-imports.rqdoneAn import path may refer to a folder. A folder is a valid import target when that path exists as a directory. Namespace import of a folder binds the alias to that folder, the same as a file. Extensionless paths still prefer a `.rq` file: [implicit_file_extension]. Related: ["../../../language/imports.rq".import_paths], [import_does_not_exist_error], ["../syntax/features-syntax.rq".file_references].0.164
remote_importsreqlan rq/extension/language/support/features-imports.rqReqlan files should support importing requirements from remote urls. Remote import syntax should follow import " https://company.com/reqs/style.rq" as styleguide. The extension should resolve, cache, and validate remote imports. Barrel imports should be recommended for token efficiency when many symbols are needed from one remote file.0.040
index_file_search_coalescereqlan rq/extension/language/support/initialisation-and-sequencing.rqdoneIndex startup does not call `findFiles` or ripgrep / `searchtext.exe`. The native workspace scan ( ["../../../indexer/cache-reuse.rq".single_sync_walk] ) is the one directory walk. Overlapping rediscover and sync callers share that in-flight scan. The scan applies `.rqignore` ( ["../../../indexer/indexer.rq".nonblocking_index] ). Related: [lsp_file_watch], ["../../index-host/index.rq".rqignore], ["../../../indexer/sequencing.rq".scan_limits].0.051
lsp_file_watchreqlan rq/extension/language/support/initialisation-and-sequencing.rqdoneThe language server must register workspace file watchers for `.rq` files only. It must not register a recursive all-files watcher. Watched-file events whose path contains a `node_modules`, `.git`, `.reqlan`, `out`, or `dist` segment must not start a document rebuild. Directory URIs without a trailing slash, Windows paths, and percent-encoded URIs must use the same segment rules. A kept `.rq` change replaces that buffer's model when the text changed ( [ast_lifecycle] ). Related: [language_server], [index_file_search_coalesce], [open_file_algorithm].0.085
file_reference_errorsreqlan rq/extension/language/support/language-server-errors.rqdoneIf a [file_reference] is not found, is broken, or cannot be resolved, the language server must show an underline. Do not show the underline when [comment_reference_ignore] ( `//rq-ignore-error` ) is on the line before. Missing files: error underline, no document link. Do not underline examples inside [inline_code] or ["../../../language/syntax.rq".code_snippets]. Empty files and files with parse errors: warning underline; the document link stays. Import-root aliases such as `@/` resolve the same way as ["../../../core_analysis/check.rq".check] and ["../../../language/imports.rq".configuration_import_root_alias]. Related: [general_errors], [comment_reference_resolution_error], [inline_code], ["./features-imports.rq".import_does_not_exist_error], ["../syntax/features-syntax.rq".file_references].0.092
general_errorsreqlan rq/extension/language/support/language-server-errors.rqerror messages should be deliberate and developer friendly. recommendations should be offerred where appropriate.0.083
language_server_rustreqlan rq/extension/language/support/language-server-rust.rqin-progressA Rust binary replaces the Langium language-server process. The extension launches `reqlan-lsp` over stdio. Open `.rq` buffers parse with [parser_rust]. The open sequence is ["open-file-sequencing.rq".open_file_algorithm]. Workspace names and rename targets come from the ideas index under [application_memory]. Inbound hints wait for the host snapshot of that index. The inbound inlay hover is markdown. It lists each referencer as a file link. An idea hover shows styled idea content when ["../syntax/features-syntax.rq".idea_content_tooltip] is on. A closed file has no retained syntax tree. Go-to-definition cost is ["../syntax/features-syntax-highlighting.rq".reference_goto_definition_speed]. When the engine is `rust`, the server also serves `rq:[…]` document links, go-to-definition, and missing-idea diagnostics in non- `.rq` comments. One resolution supplies the link, the definition target, and the underline. The host strips file document links; Ctrl + click uses definition ( ["../syntax/features-syntax-highlighting.rq".editor_reference_activation] ). The host serves those links when the engine is `node`. Host commands prefer LSP custom requests, napi extract, and the ideas index. Move / delete planners still use Langium until index-backed planners land. The setting `reqlan.languageServer.engine` selects the binary. The default is `rust`. `node` remains only when the setting says so, or when the binary is not on disk yet. A local extension build compiles this binary with the napi addon ( [extension_host_native_stage] ). The extension launches `bin/reqlan-lsp`, else that release build. It never launches a debug build, because a debug build is slow and the extension build does not refresh it. Code actions match ["../vsc-primitives.rq".code_actions]: ignore, create below, import fixes, search or wrap, idea move and delete, and barrel page. Attribute and name catalogs drive completion. Rename and find-references use open buffers plus the ideas index. Inlay hints honour `reqlan.referencesInlayHints.enabled` and the host inbound snapshot. An import link uses the parser token span ( [import_from] ). The path links to the file. An imported idea name and its alias each link to that declaration. A namespace reference links the alias and the idea as separate names. A missing leaf reports an unresolved idea on that name. Related: [language_server], [grammar_and_parser], [analytical_rust_port], [vsix_export].0.580
ast_lifecyclereqlan rq/extension/language/support/open-file-sequencing.rqdoneThe open buffer has one model. That model is the Rust parse of this buffer. [local_symbolic_analysis] is a file-local extract. The hot path does not run it as a second parse. Related: [open_file_algorithm], [open_file_sequence_diagram], [outbound_one_hop], [token_colour_sequence], [parse_budget_timeout], ["./initialisation-and-sequencing.rq".lsp_file_watch], [language_server_rust]. Populate. Parse this buffer when the editor opens it. Semantic tokens, same-file links, and the import list come from that parse. Replace. When this buffer text changes, parse again and replace the model. Do not patch the old model. A watched `.rq` change uses the same replace path ( [document_update_handler] ). When the text is unchanged, keep the current model. Drop. When the editor closes the buffer, drop the model. A closed file keeps no syntax tree ( [language_server_rust] ). Import files. [outbound_one_hop] stores a name list for each imported file. That list is not an open-buffer model. A change to an imported file does not replace this buffer's model. Read the imported file again when its content hash changes. Incomplete parse. When the budget fails, store an empty model plus diagnostics ( [parse_budget_timeout] ). Idea names stay empty until a later successful parse. The node engine follows [node_engine_open_path].0.249
comment_backlink_sequencereqlan rq/extension/language/support/open-file-sequencing.rqin-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
file_crawl_sequencereqlan rq/extension/language/support/open-file-sequencing.rqdoneWorkspace crawl is the indexer ( [index], [index_sequencing] ). It is not the open-file path. Native sync walks `.rq` files, then allowlisted code files, and writes SQLite. Open-file links must not wait for that walk ( [open_file_algorithm] ). The language server watches `.rq` files only ( ["./initialisation-and-sequencing.rq".lsp_file_watch] ). Related: [extension_startup_sequence], [background_startup].0.040
lazy_features_after_outboundreqlan rq/extension/language/support/open-file-sequencing.rqdoneAfter the hot path is on screen, show the rest when its data is ready. This pass must not delay [open_file_algorithm] steps 1 – 5. Related: [language_server], [unify_inbound_indexes], [background_startup], [inlay_hints], [codelens]. Work: - Confirm each qualified reference. Read that target file once, at depth 1. Then paint the idea line or the missing-idea error ( [missing_reference_colour_sequence] ). - Inbound backlinks: inlay hints and the file-top CodeLens, from the host snapshot ( [unify_inbound_indexes] ). - Attribute and name catalogs for completion and quick fixes. - Unqualified comment matches from that snapshot ( [comment_backlink_sequence] ). Until the first ready snapshot arrives, inlay hints and the file CodeLens stay empty. Those handlers do not open SQLite and do not call `list_all_ideas`. Later updates are incremental ready-state events ( ["../../../indexer/cache-reuse.rq".inbound_snapshot_events] ); last-good stays until replaced. When a ready snapshot arrives, refresh the visible editors.0.283
missing_reference_colour_sequencereqlan rq/extension/language/support/open-file-sequencing.rqdonePaint 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
native_cache_retentionreqlan rq/extension/language/support/open-file-sequencing.rqdoneThe language server keeps the open-buffer model for each open editor. It keeps a depth-1 name list for each imported file, and for each qualified-reference file the background pass has confirmed, while an open editor still needs that list. A closed editor drops its model. It also drops name lists that no open editor still needs. A file-watcher delete drops that URI from both caches. A check of a closed file may parse it once. That result is not stored. Related: [open_file_hot_path], [outbound_one_hop], [ast_lifecycle].0.072
node_engine_open_pathreqlan rq/extension/language/support/open-file-sequencing.rqdoneThis idea applies when `reqlan.languageServer.engine` is `node`. The default engine is [language_server_rust]. The node server populates a Langium AST for the open buffer at `DocumentState.Parsed`. Later builder phases attach scopes, links, and diagnostics. They must not replace that AST. Parsed-time handlers must not read Langium `.ref`. Use `$refText`, the symbolic extract, or `peekResolvedRef` until `ComputedScopes`. The linker must not resolve a cross-reference while that document is below `ComputedScopes`. Do not log the Langium warning. Do not store a failed link. Scope lookup, code lens, completion, and idea summaries use `readResolvedRef` or `peekResolvedRef` until that phase. When another `.rq` file changes, relink this document when the index says it is affected, when comment references name that file, or when this document's outbound targets include the changed URI. Do not relink every document that still has a linker error. Workspace load parses at most 8 files at a time ( [workspace_parse_concurrency] ). `fileIdeasCache` and `importPathCache` drop a URI when that document is removed ( [scope_cache_release] ). Related: [open_file_algorithm], [ast_lifecycle].0.133
open_file_algorithmreqlan rq/extension/language/support/open-file-sequencing.rqdoneWhen 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
open_file_hot_pathreqlan rq/extension/language/support/open-file-sequencing.rqin-progressOpen-file work stays on the one parse of this buffer plus one parse per imported file. Reuse that model for document links, go-to-definition, hover, and diagnostics until the text or the import-root mapping changes. Keep that model, and the import name lists, only for open editors ( [native_cache_retention] ). Look up an open import by URI. Do not match on file basename. Do not read SQLite. Do not call `list_all_ideas`. At parse time, publish lex and parse diagnostics with same-file and import errors. The editor must not wait for a workspace link phase to see a broken parse. Handlers on this path read the open model. They do not build a workspace link graph. Related: [open_file_algorithm], [outbound_one_hop], [ast_lifecycle], [comment_backlink_sequence].0.186
open_file_sequence_diagramreqlan rq/extension/language/support/open-file-sequencing.rq[open_file_algorithm] Actors: VS Code editor, TextMate grammar, extension host, `reqlan-lsp`, file system.0.117
outbound_one_hopreqlan rq/extension/language/support/open-file-sequencing.rqdoneThe hot path parses imported files only. For each import in the open buffer, parse that file once, then stop. Read idea names, idea lines, and import aliases. Do not parse files that the import references. Do not read SQLite. Prefer the open buffer text when that import is already open and dirty. Cache each parse by path plus file stamp ( modified time and size ) ( [lsp_session] ). A current stamp is one `stat`. Read and parse the file only when the stamp changed. Cache the open buffer by URI plus text fingerprint ( [open_file_hot_path] ). [local_symbolic_analysis] stays file-local. This hop is outside that extract. An extensionless import path prefers `.rq`, then the path as written ( [implicit_file_extension] ). A qualified reference that is not an import waits for [lazy_features_after_outbound]. Related: [open_file_algorithm], [non_web_reference_navigation].0.246
scope_cache_releasereqlan rq/extension/language/support/open-file-sequencing.rqdoneThis idea applies when the engine is `node` ( [node_engine_open_path] ). `fileIdeasCache` and `importPathCache` drop a URI when that Langium document is removed. A version change still replaces the entry for a document that stays. The rust server drops the open model in [native_cache_retention]. Related: [open_file_hot_path], [native_cache_retention].0.057
token_colour_sequencereqlan rq/extension/language/support/open-file-sequencing.rqdoneToken colour has two layers. They must not wait for the ideas index. TextMate paints first from the buffer text. Semantic tokens paint from the one parse ( [ast_lifecycle] ). A second extract does not paint tokens. A missing reference keeps the same token colour. The error underline is a diagnostic ( [missing_reference_colour_sequence], [reference_rendering] ). Related: [syntax_highlighting].0.117
workspace_parse_concurrencyreqlan rq/extension/language/support/open-file-sequencing.rqdoneThis idea applies when the engine is `node` ( [node_engine_open_path] ). Workspace load parses `.rq` files with a fixed limit of 8 in flight. One file that fails to parse does not cancel the other files. The steady-state set is still every workspace `.rq` file. The rust server does not parse the workspace. A closed file keeps no syntax tree ( [language_server_rust] ). Related: [ast_lifecycle], [workspace_manager].0.057