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
Typing just this causes a weird error: