Code reference detail
tokens.rs
crates/reqlan-lsp/src/analysis/tokens.rs
| Idea | Status | Tags | Summary | Katz |
|---|---|---|---|---|
| analysis_barrel | The open-buffer analysis of [language_server_rust] is a barrel module. `crates/reqlan-lsp/src/analysis.rs` declares the feature modules and re-exports their surface. It holds no feature logic. Each language feature is one module under `crates/reqlan-lsp/src/analysis/`: - `model`: the parsed open document, its parse inputs, and its name, reference, and token stores. - `text`: span and text primitives shared by all features. - `refs`: the walk over parsed references. - `tokens`: semantic token collection and encoding. - `paths`: authored path location and neighbor file queries. - `diagnostics`: parse, reference, and import errors. - `links`: document links. - `definition`: go-to-definition targets. - `hover`: hover hits. - `references`: highlights, find-references, and rename edits. - `completion`: attribute key and value completion. - `inlays`: inbound referencer hints. - `selection`: expand selection over the parse tree. - `sites`: file, wildcard, and search site payloads for host commands. The barrel is the only surface: other modules import from `crate::analysis`, not from the feature modules. Feature modules share no state beyond the document model. Each feature module carries `rq:[...]` backlinks to the ideas it implements; the barrel header carries the links for the whole concern. Related: [language_server_rust], ["./open-file-sequencing.rq".open_file_algorithm]. | 0.041 | ||
| import_statement_highlighting | done | TextMate highlighting for import lines must colour the whole statement, not only the leading `from` / `import` keyword. After `import` ( and after `from` … `import` ), the quoted path, the `import` / `as` keywords, and idea / alias names must receive scopes — they must not stay default-white while still looking interactive from a path document link alone. Root cause: a short `^\\b(from|import)\\b` match ran before the path patterns and consumed the keyword so the path never scoped. Fix: line-scoped `meta.import.reqlan` begin / end rules that paint path, keywords, and names. Semantic tokens still paint import AST nodes ( and must `return` after handling them ). | 0.056 | |
| syntax_highlighting | done | . rq files should receive full syntax highlighting coverage for all reqlan constructs. Semantic token highlighting should distinguish ideas, attributes, references, imports, and keywords. Path + wildcard idea refs ( `["…/*.rq".idea_*]` ) must highlight as links / strings — not comment-grey — see ["./features-syntax-highlighting.rq".wildcard_reference_highlighting]. Import lines must colour path and keywords after `import` / `from` — see ["./features-syntax-highlighting.rq".import_statement_highlighting]. Same-line named braces ( `name {}`, `name {hello}` ) must close in TextMate so later one-liners stay visible — see ["./features-syntax-highlighting.rq".same_line_named_block_highlighting]. | 0.078 |
Reference labels
"../../../../crates/reqlan-lsp/src/analysis/tokens.rs"