This extension automatically attempts to import functions when you paste code containing a function call that is not yet imported.
Useful for javascript projects where you find yourself copying and pasting functions too many times and need to import it every time manually
Auto Import Detection: Automatically detects when a function is pasted into your code and tries to import it.
Language Support: Currently supports JavaScript and TypeScript files.
Status Bar Control: Easily enable or disable the extension directly from the VS Code status bar.
Demo
Requirements
No specific requirements or dependencies are needed to use this extension.
Usage
It detects the function, checks if it is already imported, goes to the end of the function name, calls VSCode suggestions, and applies the first one.
It will be triggered by any code change, not only pasted code.
It is limited to only do that if only one function is detected. We can make it cover multiple functions, but it might take more time and be inconvenient.