Sharing a little experience setting up Reason dev env with Vim


I shared my exprience in this post,
Also, I’m curious how everyone is setting up their Reason dev env with Vim.


reason-language-server is very useful. I have this in my vimrc:

let g:LanguageClient_serverCommands = {
    \ 'reason': ['~/.vim/rls-linux/reason-language-server']
    \ }

function LC_maps()
  if has_key(g:LanguageClient_serverCommands, &filetype)
    nnoremap <buffer> <silent> <leader>t :call LanguageClient#textDocument_hover()<cr>

which makes <leader>t show the type of the thing under the cursor.


I personally use Neovim + coc-nvim + ocaml-lsp and it’s worked great so far. You can check out my init.vim and my coc-settings.json if you’re interested! I’m also happy to answer questions and hear feedback, since I have no idea if this is the best approach (I just personally had a lot of problems with RLS, and ocaml-lsp works more consistently).