Skip to content

Provide full import statement text from auto-import suggestions #31658

Closed
@compojoom

Description

@compojoom

Edit from @DanielRosenwasser

Given

import { someThi/**/

or

import { someThi/**/ }

The suggestion is to look for auto-imports to and to fully complete the paths with

import { someThing } from "./some/path"

  • VSCode Version: Version 1.35.0-insider (1.35.0-insider)
  • OS Version: macos 10.14.5

Steps to Reproduce:

  1. I'm working on a react project. I have a file that does export const Buttons
    2.In another file I do import { Button... and I expect auto-complete to display Buttons and hitting enter to complete the path.

But intelliSense just shows the text Buttons (with abc in front of it) and hitting enter doesn't add the path to the import.

If I try to directly import the component from a function - then auto-import correctly adds the Component to the top of the file with an import {Button} from 'correct_path'

Does this issue occur when all extensions are disabled?: Yes

Metadata

Metadata

Assignees

Labels

Domain: Auto-importDomain: Completion ListsThe issue relates to showing completion lists in an editorFix AvailableA PR has been opened for this issueRescheduledThis issue was previously scheduled to an earlier milestoneSuggestionAn idea for TypeScript

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions