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:
parent
2c7a9342aa
commit
8fc0ec6fa5
18
autoload/SpaceVim/layers/lang/ocaml.vim
Normal file
18
autoload/SpaceVim/layers/lang/ocaml.vim
Normal 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
|
Loading…
x
Reference in New Issue
Block a user