1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-01-23 12:50:04 +08:00

Fix merlin rtp

This commit is contained in:
wsdjeg 2017-02-12 15:59:59 +08:00
parent a81df5b7e0
commit 0b6007fb19
2 changed files with 26 additions and 11 deletions

View File

@ -1,18 +1,21 @@
""
" @section lang#ocaml, layer-lang-ocaml
" @parentsection layers
" OCaml autocompletion provided by merlin
" https://github.com/ocaml/merlin/tree/master/vim/merlin
"
" Make sure `opam` and `merlin` are installed on your system.
" requirement:
" >
" opam
" merlin
" <
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'}])
call add(plugins, ['ocaml/merlin', {'on_ft' : 'ocaml', 'rtp' : 'vim/merlin'}])
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

View File

@ -30,11 +30,12 @@ CONTENTS *SpaceVim-contents*
8. lang#elixir..............................|SpaceVim-layer-lang-elixir|
9. lang#go......................................|SpaceVim-layer-lang-go|
10. lang#java.................................|SpaceVim-layer-lang-java|
11. lang#php...................................|SpaceVim-layer-lang-php|
12. lang#python.............................|SpaceVim-layer-lang-python|
13. lang#rust.................................|SpaceVim-layer-lang-rust|
14. lang#xml...................................|SpaceVim-layer-lang-xml|
15. shell.........................................|SpaceVim-layer-shell|
11. lang#ocaml...............................|SpaceVim-layer-lang-ocaml|
12. lang#php...................................|SpaceVim-layer-lang-php|
13. lang#python.............................|SpaceVim-layer-lang-python|
14. lang#rust.................................|SpaceVim-layer-lang-rust|
15. lang#xml...................................|SpaceVim-layer-lang-xml|
16. shell.........................................|SpaceVim-layer-shell|
5. FAQ........................................................|SpaceVim-faq|
==============================================================================
@ -565,6 +566,17 @@ This layer is for java development.
<
==============================================================================
LANG#OCAML *SpaceVim-layer-lang-ocaml*
OCaml autocompletion provided by merlin
Make sure `opam` and `merlin` are installed on your system. requirement:
>
opam
merlin
<
==============================================================================
LANG#PHP *SpaceVim-layer-lang-php*