Skip to content

Autocompletion for stores that need to be imported #1792

@dummdidumm

Description

@dummdidumm

Description

Typing $foo in a Svelte file where foo is defined in some other file and not imported yet results in no auto import completion currently. It would be great if it would.

Proposed solution

The idea would be to do a hidden global autocompletion at the start of the file and filter for the given name just without the $ prefix. To not tank performance, those autocompletions should be cached. The idea could be to trigger them on $ and save them for a minimum of 10 seconds or as long as no modification to another Svelte file's module context or another TS/JS file was made.

(Completions are already triggered currently when typing $foo but they don't contain foo as a suggestion due to the leading dollar sign)

Alternatives

No response

Additional Information, eg. Screenshots

Continuation of #1583

Metadata

Metadata

Assignees

No one assigned

    Labels

    FixedFixed in master branch. Pending production release.feature requestNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions