1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-02-23 17:41:32 +08:00
SpaceVim/autoload/SpaceVim/layers/lang/ocaml.vim
2017-02-11 13:20:38 +08:00

19 lines
664 B
VimL

" OCaml autocompletion provided by merlin
" https://github.com/ocaml/merlin/tree/master/vim/merlin
"
" Make sure `opam` and `merlin` are installed on your system.
function! SpaceVim#layers#lang#ocaml#plugins() abort
let plugins = []
let g:opamshare = substitute(system('opam config var share'),'\n$','','''')
call add(plugins, [g:opamshare . "/merlin/vim", {'on_ft' : 'ocaml'}])
return plugins
endfunction
function! SpaceVim#layers#lang#ocaml#config() abort
let g:syntastic_ocaml_checkers = ['merlin']
augroup SpaceVim_Ocaml
autocmd FileType ocaml execute "helptags " . g:opamshare . "/merlin/vim/doc"
augroup END
endfunction