Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Custom Auto ImportNew to Visual Studio Code? Get it now.
Custom Auto Import

Custom Auto Import

Alexander Ruliov

|
1,729 installs
| (1) | Free
Provides ability to declare custom names for packages autoimport
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Custom AutoImport

Settings example:

{
	"customAutoImport": {
		"imports": {
			"_": "lodash",
			"{ flatMap }": "lodash",
			"{ filter as _filter }": "lodash",
			"{ useMemo, useCallback, useEffect }": "react",
			"MySomething": "@myprefix/mylib/something"
		}
	}
}

Then, autocomplete will offer to autoimport lodash as _, or _filter as alias to filter from lodash.

Currently, autoimport just inserts string like:

import MySomething from '@myprefix/mylib/something';

to the top of file and tries to add { nonDefault } to the existing import.

It is enough for me, but I'm open for issues.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft