flowmacs

Emacs minor mode to help you check your flow types


Project maintained by CodyReichert Hosted on GitHub Pages — Theme by mattgraham

flowmacs

Emacs minor mode to help you check your flow types

Installation

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)

Features

Custom variables:

Flowmacs exposes a few helpful functions:

Contributing

Please do!

License

MIT


Let’s connect:  ·  Medium  ·  GitHub  ·  Twitter