microsoft / microsoft/TypeScript

Settings to prefer local import over external import v2

Open
#56,676 0 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Awaiting More Feedback Domain: LS: Auto-import Suggestion
Dominant language
Go
Stars
111k
Forks
14.4k
Avg merge
1d 19h
Merged PRs (30d)
117

Description

Ideally I would have just reopened https://github.com/microsoft/vscode/issues/166924, but I'm restating it here:

image

The auto import in vscode right now seems to prefer the external module over my local one with the same name. i would like to have a settings where we can configure this behaviour

In response, @mjbvz asked

Is this only for quick fixes, or also for auto imports added by IntelliSense?

I can't speak for the original issue author, but from my point of view: Both, but if possible.

Otherwise I'll take what I can get. E.g., just being able to blacklist some imports from ever being suggested would be enough.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the linked prior issue #166924 and the reported auto-import behavior. Determine how local-versus-external preference or import blacklisting should apply to both quick fixes and IntelliSense auto imports; done means the requested behavior can be configured.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript, vscode
Domain
developer-experience, tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.