diff --git a/autoload/SpaceVim.vim b/autoload/SpaceVim.vim index c8c423572..32c1fb850 100644 --- a/autoload/SpaceVim.vim +++ b/autoload/SpaceVim.vim @@ -2,7 +2,7 @@ " @section Introduction, intro " @stylized Maktaba " @library -" @order intro version dicts functions exceptions layers colorscheme layer_lang_java layer_lang_php layer_lang_c layer-lang-rust +" @order intro version dicts functions exceptions layers autocomplete colorscheme layer_lang_java layer_lang_php layer_lang_c layer-lang-rust faq " SpaceVim is a Modular configuration, a bundle of custom settings " and plugins, for Vim. It got inspired by spacemacs. @@ -74,7 +74,7 @@ let g:spacevim_enable_neomake = 1 " < let g:spacevim_guifont = '' "" -" Enable ycm or not, but default it is 0. +" Disable/Enable YouCompleteMe, by default it is disabled. To enable it: " > " let g:spacevim_enable_ycm = 1 " < @@ -300,3 +300,24 @@ function! SpaceVim#welcome() abort wincmd p Startify endfunction + +"" +" @section FAQ, faq +" 1. How to enable YouCompleteMe? (I do not recommend to use YouCompleteMe, it +" is too big as a vim plugin, BTW I do not like using submodule in vim plugin, +" it is hard to manager by vim plugin manager.) +" +" > +" step 1: add `let g:spacevim_enable_ycm = 1` to custom_config, by default it +" should be `~/.SpaceVim.d/init.vim`. +" +" step 2: Get into the directory of YouCompleteMe's author, by default it +" should be `~/.cache/vimfiles/repos/github.com/Valloric/`, If you find the +" directory `YouCompleteMe` in it, just get into it, otherwise clone +" YouCompleteMe repo by +" `git clone https://github.com/Valloric/YouCompleteMe.git`, after cloning, +" get into it, run `git submodule update --init --recursive`. +" +" step 3: compile YouCompleteMe with the feature you want. if you just want +" support c family, you need run `./install.py --clang-completer`. +" < diff --git a/autoload/SpaceVim/layers/autocomplete.vim b/autoload/SpaceVim/layers/autocomplete.vim index 70335b636..33ada32e3 100644 --- a/autoload/SpaceVim/layers/autocomplete.vim +++ b/autoload/SpaceVim/layers/autocomplete.vim @@ -1,3 +1,15 @@ +"" +" @section Autocomplete, autocomplete +" SpaceVim use neocomplete as default completion engine for vim with lua +" support, if has no lua support neocomplcache will be the completion engine. +" SpaceVim use deoplete as default completion engine for nevoim. to make +" neovim support python, please read neovim's |provider-python|. +" +" SpaceVim include YouCompleteMe, but it is disabled by default, to enable +" ycm, see |g:spacevim_enable_ycm|. + + + function! SpaceVim#layers#autocomplete#plugins() abort let plugins = [ \ ['honza/vim-snippets', {'on_i' : 1, 'loadconf_before' : 1}], @@ -10,9 +22,9 @@ function! SpaceVim#layers#autocomplete#plugins() abort \ ['Shougo/neopairs.vim', { 'on_i' : 1}], \ ] if g:spacevim_autocomplete_method ==# 'ycm' - call add(plugins, ['SirVer/ultisnips', {'loadconf_before' : 1}]) - call add(plugins, ['ervandew/supertab', {'loadconf_before' : 1}]) - call add(plugins, ['Valloric/YouCompleteMe', {'loadconf_before' : 1}]) + call add(plugins, ['SirVer/ultisnips', {'loadconf_before' : 1, 'merged' : 0}]) + call add(plugins, ['ervandew/supertab', {'loadconf_before' : 1, 'merged' : 0}]) + call add(plugins, ['Valloric/YouCompleteMe', {'loadconf_before' : 1, 'merged' : 0}]) elseif g:spacevim_autocomplete_method ==# 'neocomplete' "{{{ call add(plugins, ['Shougo/neocomplete', { \ 'on_i' : 1, diff --git a/autoload/SpaceVim/layers/lang/perl.vim b/autoload/SpaceVim/layers/lang/perl.vim index 78542b535..5e93e584c 100644 --- a/autoload/SpaceVim/layers/lang/perl.vim +++ b/autoload/SpaceVim/layers/lang/perl.vim @@ -1,6 +1,7 @@ function! SpaceVim#layers#lang#perl#plugins() abort let plugins = [] call add(plugins, ['WolfgangMehner/perl-support', {'on_ft' : 'perl'}]) + call add(plugins, ['c9s/perlomni.vim', {'on_ft' : 'perl'}]) return plugins endfunction diff --git a/config/plugins/deoplete.vim b/config/plugins/deoplete.vim index 6b5607d37..81f69bf24 100644 --- a/config/plugins/deoplete.vim +++ b/config/plugins/deoplete.vim @@ -11,6 +11,11 @@ let g:deoplete#omni#input_patterns.java = [ \'[^. \t0-9]\->\w*', \'[^. \t0-9]\::\w*', \] +let g:deoplete#omni#input_patterns.perl = [ + \'[^. \t0-9]\.\w*', + \'[^. \t0-9]\->\w*', + \'[^. \t0-9]\::\w*', + \] let g:deoplete#omni#input_patterns.jsp = ['[^. \t0-9]\.\w*'] let g:deoplete#omni#input_patterns.javascript = ['[^. \t0-9]\.\w*'] let g:deoplete#omni#input_patterns.php = '\h\w*\|[^. \t]->\%(\h\w*\)\?\|\h\w*::\%(\h\w*\)\?' @@ -21,6 +26,7 @@ let g:deoplete#ignore_sources = {} let g:deoplete#ignore_sources.go = ['omni'] let g:deoplete#ignore_sources.c = ['omni'] let g:deoplete#ignore_sources.rust = ['omni'] +let g:deoplete#ignore_sources.perl = ['omni'] call deoplete#custom#set('go', 'mark', '') call deoplete#custom#set('clang2', 'mark', '') call deoplete#custom#set('racer', 'mark', '') diff --git a/doc/SpaceVim.txt b/doc/SpaceVim.txt index 3a98dac6c..f4e5f85e5 100644 --- a/doc/SpaceVim.txt +++ b/doc/SpaceVim.txt @@ -7,11 +7,13 @@ CONTENTS *SpaceVim-contents* 2. Configuration...........................................|SpaceVim-config| 3. Functions............................................|SpaceVim-functions| 4. Layers..................................................|SpaceVim-layers| - 5. Colorscheme........................................|SpaceVim-colorscheme| - 6. Layer_lang_java................................|SpaceVim-layer_lang_java| - 7. Layer_lang_php..................................|SpaceVim-layer_lang_php| - 8. Layer_lang_c......................................|SpaceVim-layer_lang_c| - 9. layer-lang-rust................................|SpaceVim-layer-lang-rust| + 5. Autocomplete......................................|SpaceVim-autocomplete| + 6. Colorscheme........................................|SpaceVim-colorscheme| + 7. Layer_lang_java................................|SpaceVim-layer_lang_java| + 8. Layer_lang_php..................................|SpaceVim-layer_lang_php| + 9. Layer_lang_c......................................|SpaceVim-layer_lang_c| + 10. layer-lang-rust...............................|SpaceVim-layer-lang-rust| + 11. FAQ.......................................................|SpaceVim-faq| ============================================================================== INTRODUCTION *SpaceVim-intro* @@ -79,7 +81,7 @@ set the guifont of Spacevim, default is empty. < *g:spacevim_enable_ycm* -Enable ycm or not, but default it is 0. +Disable/Enable YouCompleteMe, by default it is disabled. To enable it: > let g:spacevim_enable_ycm = 1 < @@ -224,6 +226,17 @@ LAYERS *SpaceVim-layers* SpaceVim support such layers: +============================================================================== +AUTOCOMPLETE *SpaceVim-autocomplete* + +SpaceVim use neocomplete as default completion engine for vim with lua +support, if has no lua support neocomplcache will be the completion engine. +SpaceVim use deoplete as default completion engine for nevoim. to make neovim +support python, please read neovim's |provider-python|. + +SpaceVim include YouCompleteMe, but it is disabled by default, to enable ycm, +see |g:spacevim_enable_ycm|. + ============================================================================== COLORSCHEME *SpaceVim-colorscheme* @@ -444,5 +457,28 @@ mappings: normal gd rust-doc < +============================================================================== +FAQ *SpaceVim-faq* + + 1. How to enable YouCompleteMe? (I do not recommend to use YouCompleteMe, it +is too big as a vim plugin, BTW I do not like using submodule in vim plugin, +it is hard to manager by vim plugin manager.) + + +> + step 1: add `let g:spacevim_enable_ycm = 1` to custom_config, by default it + should be `~/.SpaceVim.d/init.vim`. + + step 2: Get into the directory of YouCompleteMe's author, by default it + should be `~/.cache/vimfiles/repos/github.com/Valloric/`, If you find the + directory `YouCompleteMe` in it, just get into it, otherwise clone + YouCompleteMe repo by + `git clone https://github.com/Valloric/YouCompleteMe.git`, after cloning, + get into it, run `git submodule update --init --recursive`. + + step 3: compile YouCompleteMe with the feature you want. if you just want + support c family, you need run `./install.py --clang-completer`. +< + vim:tw=78:ts=8:ft=help:norl: