Skip to content

Preference setting to see more direct import labels in context menu #47521

@moniuch

Description

@moniuch

TS Template added by @mjbvz

TypeScript Version: 4.5.4

Search Terms

  • code actions
  • quick fixes
  • add missing import

TL;DR
I would appreciate a setting which would allow me to see simplified, less verbose import commands in the cmd-. context menu.


Currently the menu items are very verbose, changing their description depending on whether other symbols had been imported from the same package.

If this were your first import from 'rxjs', you would see something like:
import 'switchMap' from module 'rxjs'

If there had been other symbols imported from this library before:
Add 'switchMap' to existing import declaration from "rxjs"

My preference would be to always see the final import command instead:
import { switchMap } from 'rxjs'

I personally don't care if this command would be precise in describing the current state, or not, I would just prefer to see a clear import statement for the symbol I am focused on.

Verbose commands make me eye-hunt the command and put some mental micro-burden on reading and understanding the command. Seeing a very direct and "constant" import statement will immediately pop into my eye.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Awaiting More FeedbackThis means we'd like to hear from more people who would be helped by this featureSuggestionAn idea for TypeScript

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions