Skip to content

[Feature request] Imports on the fly #224

Open
@svipas

Description

Is that would be possible to have something like in WebStorm?

Unambiguous imports on the fly With this checkbox selected, WebStorm adds import statements when you type your code or paste a fragment with a symbol that is not yet imported if there is only one source to import the symbol from.

Meaning that for e.g. if I type Text while my suggest widget is turned off it automatically imports it from the react-native package, because Text exists there. Or lets say I'm in Node.js project and I type path. and it automatically adds: import path from "path".

I thought about creating an extension which reads diagnostics and uses built-in VS Code source.addMissingImports, but I do believe you guys are way more experienced to know more gotchas and if it really possible to have this feature which works reliably.

/cc @zardoy @Ilanaya

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions