Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?

How I have NeoVim set up for ReasonML Development

Install neovim python package:

$ pip2 install neovim
$ pip3 install neovim

Per https://reasonml.github.io/guide/editor-tools/global-installation, install global binaries:

$ npm install -g https://github.com/reasonml/reason-cli/archive/beta-v-1.13.6-bin-darwin.tar.gz # For macOS

This installs refmt and Merlin.


Install vim-reason, Neoformat, and ale.


Do this in your .vimrc/init.vim:

if executable('refmt')
  let g:neoformat_reason_refmt = {
        \ 'exe': 'refmt',
        \ 'stdin': 1,
        \ }

  let g:neoformat_enabled_reason = ['refmt']

  augroup refmt
    autocmd!
    autocmd BufWritePre *.re Neoformat
  augroup END
endif
@athaeryn

This comment has been minimized.

Copy link
Owner Author

@athaeryn athaeryn commented Aug 22, 2017

Typing just this causes a weird error:

[%bs.raw];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment