1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-04-15 08:09:11 +08:00

added basic ocaml(merlin) support

This commit is contained in:
Fallenwood 2017-02-11 13:20:38 +08:00
parent 2c7a9342aa
commit 8fc0ec6fa5

View File

@ -0,0 +1,18 @@
" 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