Visual Studio Code Automatic Imports

前端 未结 12 1302
轻奢々
轻奢々 2020-12-02 11:00

I\'m in the process of making the move from Webstorm to Visual Studio Code. The Performance in Webstorm is abysmal.

Visual studio code isn\'t being very helpful abo

12条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-02 11:27

    2018 now. You don't need any extensions for auto-imports in Javascript (as long as you have checkjs: true in your jsconfig.json file) and TypeScript.

    There are two types of auto imports: the add missing import quick fix which shows up as a lightbulb on errors:

    And the auto import suggestions. These show up a suggestion items as you type. Accepting an auto import suggestion automatically adds the import at the top of the file

    Both should work out of the box with JavaScript and TypeScript. If auto imports still do not work for you, please open an issue

提交回复
热议问题