1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-03-23 17:49:57 +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 " OCaml autocompletion provided by merlin
" https://github.com/ocaml/merlin/tree/master/vim/merlin
" "
" Make sure `opam` and `merlin` are installed on your system. " Make sure `opam` and `merlin` are installed on your system.
" requirement:
" >
" opam
" merlin
" <
function! SpaceVim#layers#lang#ocaml#plugins() abort function! SpaceVim#layers#lang#ocaml#plugins() abort
let plugins = [] let plugins = []
let g:opamshare = substitute(system('opam config var share'),'\n$','','''') call add(plugins, ['ocaml/merlin', {'on_ft' : 'ocaml', 'rtp' : 'vim/merlin'}])
call add(plugins, [g:opamshare . "/merlin/vim", {'on_ft' : 'ocaml'}])
return plugins return plugins
endfunction endfunction
function! SpaceVim#layers#lang#ocaml#config() abort function! SpaceVim#layers#lang#ocaml#config() abort
let g:syntastic_ocaml_checkers = ['merlin'] let g:syntastic_ocaml_checkers = ['merlin']
augroup SpaceVim_Ocaml
autocmd FileType ocaml execute "helptags " . g:opamshare . "/merlin/vim/doc"
augroup END
endfunction endfunction

View File

@ -30,11 +30,12 @@ CONTENTS *SpaceVim-contents*
8. lang#elixir..............................|SpaceVim-layer-lang-elixir| 8. lang#elixir..............................|SpaceVim-layer-lang-elixir|
9. lang#go......................................|SpaceVim-layer-lang-go| 9. lang#go......................................|SpaceVim-layer-lang-go|
10. lang#java.................................|SpaceVim-layer-lang-java| 10. lang#java.................................|SpaceVim-layer-lang-java|
11. lang#php...................................|SpaceVim-layer-lang-php| 11. lang#ocaml...............................|SpaceVim-layer-lang-ocaml|
12. lang#python.............................|SpaceVim-layer-lang-python| 12. lang#php...................................|SpaceVim-layer-lang-php|
13. lang#rust.................................|SpaceVim-layer-lang-rust| 13. lang#python.............................|SpaceVim-layer-lang-python|
14. lang#xml...................................|SpaceVim-layer-lang-xml| 14. lang#rust.................................|SpaceVim-layer-lang-rust|
15. shell.........................................|SpaceVim-layer-shell| 15. lang#xml...................................|SpaceVim-layer-lang-xml|
16. shell.........................................|SpaceVim-layer-shell|
5. FAQ........................................................|SpaceVim-faq| 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* LANG#PHP *SpaceVim-layer-lang-php*