Hi, i’m still wondering, how to format reason file in neovim?
currently i’m using these extensions:
- vim-reason-plus (syntax highlight)
- coc (autocomplete) + coc-reason extension
any idea?
Hi, i’m still wondering, how to format reason file in neovim?
currently i’m using these extensions:
any idea?
With this setting in your :CocConfig
it should format on save for .re
and .rei
files.
"coc.preferences.formatOnSaveFiletypes": [
"reason"
]
@believer 's answer should work when you want to format the file on save.
But if you need do this manually (by hotkey) you have to map your desired shortcut to coc’s format command :call CocAction('fomrat')
. I use <leader>f
for example.
nmap <silent> <leader>f :call CocAction('format')<CR>
sorry, there is no support yet, except syntax highlighting and formating,
syntax : https://github.com/amiralies/vim-rescript/blob/master/syntax/rescript.vim
formater : using coc with (coc-rescript)