Printable idea sheet
open_file_algorithm
reqlan rq/extension/language/support/open-file-sequencing.rq:38
Katz 0.330
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 ( open_file_algorithm ).
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 ( open_file_algorithm ).
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 ( open_file_algorithm ).
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.
- implementation
- session.rs, analysis.rs, server.rs
- status
- done
- tests
- session.rs:semantic_token_range_matches_the_source_name, parity.rs:same_file_idea_references_produce_document_links, parity.rs:from_import_binds_a_local_reference, parity.rs:reports_an_error_when_an_imported_idea_does_not_exist, workspace link
Interactive page: open_file_algorithm