GoLand 2017.3 Help

Auto Import

File | Settings | Editor | General | Auto Import for Windows and Linux
GoLand | Preferences | Editor | General | Auto Import for macOS
Ctrl+Alt+S settings


XML

Show import pop-upAutomatically display an import pop-up dialog box when typing the name of an unbound namespace.

TypeScript/JavaScript

Add ES6 imports automatically

Auto import in ES6 works only when the ECMAScript 6 language level is chosen on the JavaScript page (File | Settings | Languages and Frameworks | JavaScript for Windows and Linux or GoLand | Preferences | Languages and Frameworks | JavaScript for macOS).

  • If this checkbox is selected, GoLand 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 GoLand shows a pop-up that suggests to import the completed symbol:
    ws es6 autoimport off
  • Completion and auto import also work for React components, including stateless components. GoLand properly detects them, provides code completion, and adds import statements automatically:
Add TypeScript imports automatically
  • If this checkbox is selected, GoLand automatically inserts an import statement in TypeScript code when you complete a symbol exported in another project file.
  • When the checkbox is cleared, on pressing Alt+Enter GoLand shows a pop-up that suggests to import the completed symbol.
Last modified: 12 December 2017