Skip to content

Instantly share code, notes, and snippets.

@athaeryn
Last active August 22, 2017 04:25
Show Gist options
  • Save athaeryn/61f6e5cbb6d9a0825df5d2485f32b6e5 to your computer and use it in GitHub Desktop.
Save athaeryn/61f6e5cbb6d9a0825df5d2485f32b6e5 to your computer and use it in GitHub Desktop.

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
Copy link
Author

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