Questions tagged [auto-import]

the act of importing data, settings or projects automatically to the user's environment. Auto-import features are often implemented in development GUI, e.g. to import java classes, entire projects.

45 questions
815
votes
11 answers

What is the shortcut to Auto import all in Android Studio?

Is there any way of auto importing (like in Eclipse Shift+Ctrl+O) in Android Studio? I have found only Ctrl+Alt+O which ask for each thing, and I have to press Alt+Enter to accept it. No way to do it faster?
Michał Tajchert
  • 10,021
  • 4
  • 27
  • 46
100
votes
2 answers

Auto import in Visual Studio Code only offering absolute path with Lerna subpackages in TypeScript

For some reason, very recently my Visual Studio Code changed and started only offering absolute imports from the sub-package level with my Lerna packages, for example: As you can see, the auto import is suggesting the @package/server/src/database…
Anupheaus
  • 2,011
  • 2
  • 19
  • 28
36
votes
6 answers

Python auto import extension for VSCode

Is there a Python auto import extension/plugin available for Visual Studio Code? By auto import I mean, auto import of python modules. Eclipse and Intellij has this feature with Java.
Soumitri Pattnaik
  • 2,592
  • 4
  • 21
  • 38
21
votes
5 answers

Auto import for Xcode

Is it possible for Xcode to auto import the frameworks and class headers automatically? What happens is that every time I build, I will encounter errors due to missing import. I know how to fix, but I felt Xcode can be more intelligent by perhaps…
samwize
  • 21,403
  • 14
  • 118
  • 171
12
votes
1 answer

How to configure VS Code Auto import?

Is there a way of tweaking TypeScript Auto import feature in Visual Studio Code? As an example, observe the following attempt: The added line by the Auto import was the following: import { Pins } from '../types/index'; I would like it to be…
Samuel
  • 911
  • 12
  • 24
12
votes
1 answer

How to disable auto import from specific files in VSCode?

Is there any way to tell vscode to not autoimport from specific files?
Nekor
  • 157
  • 1
  • 7
12
votes
1 answer

Xamarin auto-import shortcut

In eclipse, it's ctrl+shift+o, which automaticly imports everything. But how can I do this in Xamarin? I don't remember every package and there aren't those lightbulbs, which are in Eclipse that would help me to "quick-fix" the problem. So, is there…
Vilda
  • 1,493
  • 16
  • 39
11
votes
0 answers

VSCode auto imports for React Native with JavaScript

I know VSCode supports auto import for JavaScript. For some reason, it does not work with React Native. There is even a dedicated section on the VSCode website for this. But it only answers how to fix this problem for Typescript (using…
J. Hesters
  • 8,261
  • 15
  • 78
  • 164
10
votes
3 answers

Intellisense for available 'using/import's in C# with Visual Studio Code

Edit: Vidual Studio Code and Visual Studio are 2 different things. Yes it's confusing but I know that VS has this feature, I'm asking about VS code. Is there some extension/setting that makes Visual Studio Code's c# have Intellisense for all…
Fudge Fudge
  • 474
  • 5
  • 16
8
votes
2 answers

How can I decide to add .idea/jarRepositories.xml in .gitignore

I found an unfamiliar file .idea/jarRepositories.xml, when I updated Android Studio 3.5.3 to 4.0.1 on Mac. The content is as follows:
qtmfld
  • 2,606
  • 2
  • 16
  • 33
6
votes
0 answers

VSCode auto import not recognising eslint alias/webpack resolve/tsconfig paths

I have an node module which I want to create an alias for. I have the following configs: // tsconfig.json { "compilerOptions": { ... "allowJs": true, "module": "commonjs", "target": "es6", "jsx": "react", …
Uri Klar
  • 2,436
  • 3
  • 29
  • 55
5
votes
1 answer

Android Studio editor: how to disable blue popup of import suggestions

Apparently with the latest upgrade to Android Studio (2.2.2 built 18 oct 2016), it now displays blue popup hints (AKA Auto Import Suggestions) in the editor, hovering over the line where you have your cursor if there is a syntax or other error in…
Peri Hartman
  • 17,906
  • 17
  • 49
  • 85
4
votes
1 answer

VSCode auto-import not working for clean angular project

Having a clean Angular 10 project with Typescript 3.9.7, some auto imports and suggestions are not working. For example, I begin to type FormsM... and it should appear FormsModule to autocomplete and auto import from @angular/forms, but this option…
3
votes
1 answer

Incorrect Typescript imports in VSCode for MacOS

In VSCode, auto imports are not correct on MacOS. This is what I see when referring to an unimported module in VSCode. However, the file path is incorrect. This path assumes that the file is located at the root of the project which is not…
Parth Tamane
  • 1,611
  • 10
  • 24
3
votes
0 answers

Prevent auto-import : when copy-paste Java code into Kotlin Android project

Facing issue when add copied code from stack-overflow into the android studio and android studio's auto import functionality imports android.R package even if it is already imported with our app package name. Here is steps to reproduce issue. 1)…
Sagar Kacha
  • 7,242
  • 4
  • 14
  • 25
1
2 3