Flow for Visual Studio Code
Want to help make Flow in VS Code really shine? We're looking for someone to help move this project to use the new flow-language-server support in flow. This means the flow core team would add features, and this extension will get them for almost free. If this is you, you can get set up for development easily and then contrinute to this WIP PR.
Search for "flow" in the VS Code extensions panel or install through the marketplace.
- Make sure you have a
.flowconfig file in your workspace.
- Make sure you are able to run the
flow command from the command line (or see Configuration to customize the command or use NPM packaged flow).
false or completely disable the built-in TypeScript extension for your project (see gif below):
You can specify a configuration by amending the VS Code
settings.json file. Access this through Preferences → Settings. You must reload VS Code after installing this extension for these settings to take affect.
flow.pathToFlow (default: 'flow') path to Flow that will be used for VSCode (eg;
flow.stopFlowOnExit (default: true) stop flow server on exit from Project.
flow.enabled (default: true) you can disable flow for some Project for example.
flow.useNPMPackagedFlow (default: false) you can also run Flow by defining it in your
true will display a spinner in the status-bar while flow is type checking.
true will run flow on every edit, otherwise will run only when changes are saved.
false) Run Flow on all files, No need to put
//@flow comment on top of files.
false) Run Flow through Language Server Protocol [EXPERIMENTAL].
- Go to Definition / Peek Definition
- Diagnostics (Errors, Warnings)
- Hover type information
- Toggle-able Code Coverage reports
First, follow the instructions to setup your launch configuration file,
To use flow-remove-types:
- Follow the flow-remove-type Quick Start.
"runtimeArgs": ["-r", "flow-remove-types/register"] to the "launch" configuration.
To use Babel:
- Follow the Babel Quick Start.
- Install babel-register.
"runtimeArgs": ["-r", "babel-register"] to the "launch" configuration.
This plugin is built on top of Nuclide's Flow support.