JetBrains Rider 2019.2 Help

Auto Import

File | Settings | Editor | General | Auto Import for Windows and Linux
JetBrains Rider | Preferences | Editor | General | Auto Import for macOS
Ctrl+Alt+S the Settings/Preferences icon


CLR

In this section, you can configure preferences for Common Language Runtime (CLR) languages (C#, VB.NET, F#).

Show import popup

If this option is selected, a popup that suggests importing namespaces in C# and VB.NET shows up if there is one or more non-imported types are detected in the file:

Namespace import quick-fix
If the checkbox is not selected, the corresponding action will be available in the action list on Alt+Enter.

Exclude from import and completion

Use this list to specify namespaces, types, and members that should be excluded from import namespace suggestions and class name completion.
The format of the entries is Fully.Qualified.Name, Fully.Qualified.Name.Prefix*, or *Fully.Qualified.Name.Suffix. Generic types are specified as List`1.

XML

Show import popup

Automatically display an import popup when typing the name of an unbound namespace.

TypeScript/JavaScript

Add ES6 imports on code completion

  • If this checkbox is selected, JetBrains Rider automatically inserts an import statement in JavaScript code when you complete a symbol exported using ES6 exports in another project file:

  • When the checkbox is cleared, on pressing Alt+Enter JetBrains Rider shows a popup that suggests to import the symbol:

    Add ES6 imports on code completion disabled
  • Completion and auto-import also work for React components, including stateless components. JetBrains Rider properly detects them, provides code completion, and adds import statements automatically:

Add TypeScript imports automatically

Select this checkbox if you want JetBrains Rider to generate import statements in TypeScript code. Use the checkboxes below to choose when import generation will be invoked.

  • On code completion: If this checkbox is selected, JetBrains Rider automatically inserts an import statement in TypeScript code when you complete a symbol exported in another project file.

  • With import popup: If this checkbox is selected, JetBrains Rider shows a tooltip with an import suggestion when you position the caret at an unresolved symbol that can be imported. When the checkbox is cleared, you can invoke import generation only be pressing Alt+Enter.

  • Unambiguous imports on the fly: With this checkbox selected, JetBrains Rider adds import statements when you type your code or paste a fragment with a symbol that is not yet imported if there is only one source to import the symbol from.

When you are using ES6 modules in a browser that requires full file names, for example, in Chrome, it is important that the names of ES6 modules in import statements have the .js extensions.

  • To add the extension automatically in the JavaScript context, select the Use file extension in module name checkbox on the Imports tab of the Code Style: JavaScript page.

  • To add the extension automatically in the TypeScript context, select the Use .js file extension in module name checkbox on the Imports tab of the Code Style: TypeScript page.

Last modified: 17 September 2019