Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to disable automatic import statements in VsCode October 2017

The latest version of VS Code installed a few days ago (the October 2017 update) keeps adding all kinds of strange import statements to the top of the .ts code file.

For example, as I was editing a file, VsCode suddenly added a line like this to the top of the file:

import { Stack } from "../../../../../../../../../Repos/Web/node_modules/@types/d3"; 

How do I disable this behavior?

like image 606
prmph Avatar asked Nov 17 '17 12:11

prmph


People also ask

How do I turn off auto import in VS code?

To disable auto imports, set "javascript. suggest. autoImports" to false .

How do I fix imports in VSCode?

Set the correct Python path in VSCode In order to fix Unresolved Import in VSCode, you have to set python. pythonPath key in the settings to the correct value. You can quickly open the settings. json editor by accessing File > Preferences or press Ctrl + , key combination.

How do I stop VSCode pop ups?

Type “editor. hover. enable” into the search field then check/uncheck the checkbox associated with “Controls whether the hover is shown.” to enable/disable the suggestion tooltip on hover.


2 Answers

"typescript.suggest.autoImports": false  "javascript.suggest.autoImports": false 

Fresh VS Code version. February 2019

like image 174
Evgeniy Zaykov Avatar answered Nov 15 '22 23:11

Evgeniy Zaykov


You can disable it by adding this line to your user or workspace settings (File>Preferences>Settings, or Code>Preferences>Settings).

"typescript.autoImportSuggestions.enabled": false 

Ref.: https://github.com/Microsoft/vscode/issues/38551

like image 39
Antoine Boisier-Michaud Avatar answered Nov 16 '22 00:11

Antoine Boisier-Michaud