spacemacs/layers/+lang/flow-type
2019-12-20 10:08:35 +01:00
..
config.el Revise flow-type layer 2019-12-16 13:23:10 +01:00
funcs.el Revise flow-type layer 2019-12-16 13:23:10 +01:00
layers.el Integrate flow-js2-mode into flow-type layer 2019-12-16 14:33:58 +01:00
packages.el Integrate flow-js2-mode into flow-type layer 2019-12-16 14:33:58 +01:00
README.org Improve documentation for flow-type a bit 2019-12-20 10:08:35 +01:00

Flow-type layer

Description

This layer adds support for static type checking in javascript based on the flow project to spacemacs.

Features:

  • Syntax highlighting
  • Linting
  • Code-completion
  • Eldoc integration for flow-types
  • Compilation

Install

To use this configuration layer, add it to your ~/.spacemacs. You will need to add flow-type to the existing dotspacemacs-configuration-layers list.

In addition you also need to flow binary installed best with npm like shown below.

  $ npm install -g flow-bin

The type under the cursor is shown automatically using eldoc. You may find this a little sluggish, depending on your setup - if so, you can disable it by setting flow-type-enable-eldoc-type-info to nil.

  (flow-type :variables flow-type-enable-eldoc-type-info nil)

You can always show types manually using flow-minor-type-at-pos, bound to SPC m f t by default.

Key bindings

Key binding Description
SPC m f b jump back from definition
SPC m f c run `flow status' as a compiler
SPC m f d jump to the definition of the variable under the cursor
SPC m f f show flow suggestions
SPC m f o print coverage information