Idea detail
import_statement_highlighting
reqlan rq/extension/language/syntax/features-syntax-highlighting.rq:20
Summary
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 ).
Navigation
Attributes
| Key | Value |
|---|---|
| implementation | patch-textmate.mjs, reqlan.tmLanguage.json, reqlan-semantic-token-provider.ts |
| status | done |
| tests | textmate-import-highlight.test.ts, textmate-import-highlight.test.ts:e2e: from-import line scopes path and import keyword, textmate-import-highlight.test.ts:e2e: namespace import line scopes path and as |
Ancestor context
No ancestor chain recorded.
Outbound references
Inbound references
| Kind | Idea | Path | Snippet |
|---|---|---|---|
| references | reference_rendering | reqlan rq/extension/language/syntax/features-syntax-highlighting.rq | import_statement_highlighting |
| references | syntax_highlighting | reqlan rq/extension/language/syntax/features-syntax.rq | import_statement_highlighting |
Unresolved references
| Kind | Idea | Path | Snippet |
|---|---|---|---|
| None | |||
Local graph
Initialising graph…