This feature is only supported in the Ultimate edition.
Before you start
- Install the Node.js runtime environment and configure it as a local Node.js interpreter.
- Install and enable the NodeJS repository plugin as described in Installing, Updating and Uninstalling Repository Plugins and Enabling and Disabling Plugins.
npm install --global flow-binto install Flow globally.
npm install --save-dev flow-binto install Flow in the current project.
Configuring Flow in IntelliJ IDEA
.flowconfig configuration file to your project, and supply every file to be checked with a
// @flow comment on top.
To change the language level to Flow
- In the Flow package or executable field, specify the path to the
node_modules\flow-binpackage or the Flow binary executable file. To use
node_modules\.bin\flowmake sure the path to Node.js is added to the
- In the Use Flow server for: area, specify the basis for coding assistance by selecting or clearing the following checkboxes:
- Type checking: When this checkbox is selected, syntax and error highlighting is provided based on the data received from the Flow server. When the checkbox is cleared, only the basic internal IntelliJ IDEA highlighting is available.
- Navigation, code completion, and type hinting: When this checkbox is selected, suggestion lists for reference resolution and code completiong contain both suggestions retrieved from integration with Flow and suggestions calculated by IntelliJ IDEA. When the checkbox is cleared, references are resolved through IntelliJ IDEA calculation only.
- Keep the Save all modified files automatically checkbox selected to ensure that Flow is applied continuously because Flow checks the current files only after all the other modified files are saved.
To generate a .flowconfig configuration file in your project
open the embedded Terminal ( ) and type
flow init at the command prompt.
To have a file checked with Flow
// @flow comment at the top of it: just type
flow, press Tab, and IntelliJ IDEA will expand it into