Open
Description
openedon Jan 31, 2023
Suggestion
π Search Terms
- auto import
- quick fix
- missing import
β Suggestion
Auto imports / add missing imports should be able to add import * as XYZ from 'XYZ'
when triggered on the symbol name XYZ
in a file. This is useful if you prefer using namespace imports and can also help with discovering/exploring new packages
Right now we have auto imports and an add missing import
quick fix for symbols in a module, but I don't see these options for the module itself
π Motivating Example
- In a new project
npm I @types/vscode
- Open new TS file and write
vscode.
Right now I don't get an auto import for vscode
. I'd expect an import that adds: import * as vscode from 'vscode';
at the top of the file
π» Use Cases
- Make it easier to reference a symbol if you prefer using namespaces from the start
- Helping users explore new packages (just type
vscode.
to see suggestions in thevscode
package) - Working with node packages. It'd be nice to be able to type
fs.
to get anfs
import - Fixing code that has been copy and pasted between files
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment