Idea detail
import_code_completion
reqlan rq/extension/language-support/features-imports.rq:46
Summary
Import 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
Attributes
No attributes declared.
Ancestor context
Completions 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`.
import_code_completion_path_segmentsIn a folder context, show next path segments ( directories with a trailing `/` ). After `../`, offer `../path/` before nested `../path/file.rq`.
import_code_completion_substring_matchFilter 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 ).
import_code_completion_rankingRank 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.
anonymous_reference_code_completionAnonymous imports should share the same code completion e. g. ["@/reqlan rq/extension/code_completion.rq"] should complete the same as `import "@/reqlan rq/extension/code_completion.rq" as code_completion`. they should share the same code and logic
implicit_file_extensionThe 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. A path that already carries any extension is resolved exactly as written.
| Kind | Idea | Path | Snippet |
|---|---|---|---|
| references | anonymous_reference_code_completion | reqlan rq/extension/language-support/features-imports.rq | anonymous_reference_code_completion |
| references | import_code_completion_explicit_extension | reqlan rq/extension/language-support/features-imports.rq | import_code_completion_explicit_extension |
| references | import_code_completion_path_segments | reqlan rq/extension/language-support/features-imports.rq | import_code_completion_path_segments |
| references | import_code_completion_ranking | reqlan rq/extension/language-support/features-imports.rq | import_code_completion_ranking |
| references | import_code_completion_substring_match | reqlan rq/extension/language-support/features-imports.rq | import_code_completion_substring_match |
| Kind | Idea | Path | Snippet |
|---|---|---|---|
| None | |||
| Kind | Idea | Path | Snippet |
|---|---|---|---|
| references | code_completion | code_completion |
Initialising graph…