Emacs minor mode to help you check your flow types
Switch branches/tags
Nothing to show
Clone or download
CodyReichert Merge pull request #1 from creichert/xref
Use xref to track jump-to-def
Latest commit 0fd853e Oct 28, 2018
Type Name Latest commit message Commit time
Failed to load latest commit information.
README.md Update README.md Sep 23, 2018
_config.yml Set theme jekyll-theme-midnight Sep 23, 2018
flowmacs.el Use xref to track jump-to-def Oct 29, 2018



Emacs minor mode to help you check your flow types


Clone the package:

$ git clone https://github.com/CodyReichert/flowmacs /path/to/flowmacs

Enable with your mode of choice:

(add-to-list 'load-path "/path/to/flowmacs/")

(require 'flowmacs)

(add-hook 'web-mode-hook 'flowmacs-mode)
Custom flow-bin

Update the flowmacs/+flow+ variable to an absolute path to your flow binary. For example, to use flow-bin from the local node_modules:

(defun my/set-flowmacs-flow ()
  (let* ((root (locate-dominating-file
                (or (buffer-file-name) default-directory) "node_modules"))
         (flow (and root (expand-file-name "node_modules/.bin/flow" root))))
    (when (and flow (file-executable-p flow))
      ;; Set binary path
      (setq-local flowmacs/+flow+ flow))))

(add-hook 'flowmacs-hook 'my/set-flowmacs-flow)


Custom variables:

  • flowmacs/+flow+: Absolute path to the flow binary
  • flowmacs/+flow-buffer+: Name of the buffer to print flow output.

Flowmacs exposes a few helpful functions:

  • (flowmacs/start): Start flow
  • (flowmacs/stop): Stop flow
  • (flowmacs/status): Run flow status and print errors to the Flow Output buffer.
  • (flowmacs/type-at-pos): Print the type signature of the value or function under point to the minibuffer.
  • (flowmacs/find-refs): Print a list of references to the value or function under point.
  • (flowmacs/suggest-types): Insert types suggested by flow into the current buffer.
  • (flowmacs/jump-to-def): Jump to the definition of the value of function under point.


Please do!

  • Add support for more flow cli commands
  • Improve shell-command-to-string to use $PATH
  • Submit recipe to mela



Let's connect:  ·  Medium  ·  GitHub  ·  Twitter