reqlanOverviewIdeasFilesCode filesClustersAttributesGraphPrint
Ideas/import_code_completion

Idea detail

import_code_completion

reqlan rq/extension/language-support/features-imports.rq:46

block

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

Jump to outbound references

Jump to inbound references

Navigation

Source file

reqlan rq/extension/language-support/features-imports.rq

community 18

community cluster

features-imports.rq

file cluster

reqlan rq/extension/language-support

folder cluster

status: Not present

status cluster

tag: Not present

tag cluster

Printable page

Static print-friendly idea sheet.

Attributes

No attributes declared.

Ancestor context

import_code_completion_explicit_extension

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_segments

In a folder context, show next path segments ( directories with a trailing `/` ). After `../`, offer `../path/` before nested `../path/file.rq`.

import_code_completion_substring_match

Filter 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_ranking

Rank 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_completion

Anonymous 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_extension

The 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.

Outbound references

KindIdeaPathSnippet
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

Inbound references

KindIdeaPathSnippet
None

Unresolved references

KindIdeaPathSnippet
references code_completion code_completion

Local graph

Initialising graph…