Skip to content

Servers OCaml Reason

Will edited this page Aug 28, 2018 · 2 revisions

Installing server

npm install -g ocaml-language-server
  if executable('ocaml-language-server')
    au User lsp_setup call lsp#register_server({
          \ 'name': 'ocaml-language-server',
          \ 'cmd': {server_info->[&shell, &shellcmdflag, 'ocaml-language-server --stdio']},
          \ 'whitelist': ['reason', 'ocaml'],
          \ })
  endif

If Merlin was installed using OPAM, use this instead:

  if executable('ocaml-language-server')
    au User lsp_setup call lsp#register_server({
          \ 'name': 'ocaml-language-server',
          \ 'cmd': {server_info->[&shell, &shellcmdflag, 'opam config exec -- ocaml-language-server --stdio']},
          \ 'whitelist': ['reason', 'ocaml'],
          \ })
  endif