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
Is that would be possible to have something like in WebStorm?
Meaning that for e.g. if I type
Textwhile my suggest widget is turned off it automatically imports it from thereact-nativepackage, becauseTextexists there. Or lets say I'm in Node.js project and I typepath.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