diff --git a/.gitignore b/.gitignore index d48d8e6d9..94cd3d1fd 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ tags +doc/tags *.html *.class .floo diff --git a/autoload/SpaceVim.vim b/autoload/SpaceVim.vim index 77f6b7258..478fdf486 100644 --- a/autoload/SpaceVim.vim +++ b/autoload/SpaceVim.vim @@ -76,7 +76,6 @@ let g:spacevim_wildignore = '*/tmp/*,*.so,*.swp,*.zip,*.class,tags, \*.ttf,*.TTF,*.png,*/target/*, \.git,.svn,.hg,.DS_Store' - function! SpaceVim#loadCustomConfig() abort let custom_confs = SpaceVim#util#globpath(getcwd(), '.local.vim') let custom_glob_conf = expand('~/.local.vim') @@ -90,7 +89,9 @@ endfunction "" " @public -" Load the {layer} you want +" Load the {layer} you want : +" autocompletion : Make SpaceVim support autocompletion. +" unite : Unite centric work-flow function! SpaceVim#Layer(layer) abort if index(g:spacevim_plugin_groups, a:layer) == -1 call add(g:spacevim_plugin_groups, a:layer) @@ -124,12 +125,17 @@ function! SpaceVim#end() abort if g:spacevim_enable_neocomplcache let g:spacevim_autocomplete_method = 'neocomplcache' endif + "" + " generate tags for SpaceVim + let help = fnamemodify(g:Config_Main_Home, ':p:h:h') . '/doc' + exe 'helptags ' . help endfunction function! SpaceVim#default() abort call add(g:spacevim_plugin_groups, 'web') call add(g:spacevim_plugin_groups, 'lang') + call add(g:spacevim_plugin_groups, 'checkers') call add(g:spacevim_plugin_groups, 'chat') call add(g:spacevim_plugin_groups, 'javascript') call add(g:spacevim_plugin_groups, 'ruby') diff --git a/autoload/zvim/plug.vim b/autoload/zvim/plug.vim index 882978531..5fa385292 100644 --- a/autoload/zvim/plug.vim +++ b/autoload/zvim/plug.vim @@ -182,7 +182,11 @@ function! zvim#plug#enable_plug() abort endfunction function! zvim#plug#loadPluginBefore(plugin) abort - call zvim#util#source_rc('plugins_before/' . a:plugin) + if matchend(a:plugin, ".vim") == len(a:plugin) + call zvim#util#source_rc('plugins_before/' . a:plugin) + else + call zvim#util#source_rc('plugins_before/' . a:plugin . '.vim') + endif endfunction let &cpo = s:save_cpo diff --git a/config/plugins.vim b/config/plugins.vim index 4b3161900..321873b71 100644 --- a/config/plugins.vim +++ b/config/plugins.vim @@ -5,6 +5,25 @@ let s:plugins.core = [ \ ['Shougo/vimproc.vim', {'build' : 'make'}], \ ] +let s:plugins.colorscheme = [ + \ ['morhetz/gruvbox', {'loadconf' : 1}], + \ ['kristijanhusak/vim-hybrid-material'], + \ ['altercation/vim-colors-solarized'], + \ ['nanotech/jellybeans.vim'], + \ ['mhartington/oceanic-next'], + \ ['mhinz/vim-janah'], + \ ['tomasr/molokai'], + \ ['kabbamine/yowish.vim'], + \ ] + +let s:plugins.checkers = [] +if g:spacevim_enable_neomake + call add(s:plugins.checkers, ['neomake/neomake',{'merged' : 0, 'loadconf' : 1 , 'loadconf_before' : 1}]) +else + call add(s:plugins.checkers, ['wsdjeg/syntastic', {'on_event': 'WinEnter', 'loadconf' : 1, 'merged' : 0}]) +endif + + let s:plugins.unite = [ \ ['Shougo/unite.vim',{ 'merged' : 0 , 'loadconf' : 1}], \ ['Shougo/neoyank.vim'], @@ -261,17 +280,6 @@ if zvim#plug#enable_plug() if count(g:spacevim_plugin_groups, 'colorscheme') "{{{ "colorscheme - call zvim#plug#add('morhetz/gruvbox') - if zvim#plug#tap('gruvbox') - call zvim#plug#defind_hooks('gruvbox') - endif - call zvim#plug#add('kabbamine/yowish.vim') - call zvim#plug#add('tomasr/molokai') - call zvim#plug#add('mhinz/vim-janah') - call zvim#plug#add('mhartington/oceanic-next') - call zvim#plug#add('nanotech/jellybeans.vim') - call zvim#plug#add('altercation/vim-colors-solarized') - call zvim#plug#add('kristijanhusak/vim-hybrid-material') endif if count(g:spacevim_plugin_groups, 'chinese') "{{{ @@ -325,27 +333,6 @@ if zvim#plug#enable_plug() " use this two command to find how long the plugin take! "profile start vim-javacomplete2.log "profile! file */vim-javacomplete2/* - if g:spacevim_enable_neomake - call zvim#plug#add('neomake/neomake',{'merged' : 0}) - if zvim#plug#tap('neomake') - call zvim#plug#defind_hooks('neomake') - augroup Neomake_wsd - au! - autocmd! BufWritePost * Neomake - augroup END - endif - else - call zvim#plug#add('wsdjeg/syntastic', {'on_event': 'WinEnter'}) - if zvim#plug#tap('syntastic') - call zvim#plug#defind_hooks('syntastic') - endif - endif - let g:syntastic_vimlint_options = { - \'EVL102': 1 , - \'EVL103': 1 , - \'EVL205': 1 , - \'EVL105': 1 , - \} call zvim#plug#add('gcmt/wildfire.vim',{'on_map' : '(wildfire-'}) noremap (wildfire-fuel) vnoremap (wildfire-water) diff --git a/config/plugins/syntastic.vim b/config/plugins/syntastic.vim index 682f4cf03..ea8ad3627 100644 --- a/config/plugins/syntastic.vim +++ b/config/plugins/syntastic.vim @@ -10,3 +10,9 @@ let g:syntastic_check_on_open = 0 let g:syntastic_check_on_wq = 0 let g:syntastic_error_symbol = get(g:, 'spacevim_error_symbol', '✖') let g:syntastic_warning_symbol = get(g:, 'spacevim_warning_symbol', '➤') +let g:syntastic_vimlint_options = { + \'EVL102': 1 , + \'EVL103': 1 , + \'EVL205': 1 , + \'EVL105': 1 , + \} diff --git a/config/plugins_before/neomake.vim b/config/plugins_before/neomake.vim new file mode 100644 index 000000000..b78e5fb8b --- /dev/null +++ b/config/plugins_before/neomake.vim @@ -0,0 +1,4 @@ +augroup Neomake_wsd + au! + autocmd! BufWritePost * Neomake +augroup END diff --git a/doc/SpaceVim.txt b/doc/SpaceVim.txt index ba0b23371..dc9716195 100644 --- a/doc/SpaceVim.txt +++ b/doc/SpaceVim.txt @@ -65,7 +65,8 @@ twitter. FUNCTIONS *SpaceVim-functions* SpaceVim#Layer({layer}) *SpaceVim#Layer()* - Load the {layer} you want + Load the {layer} you want : autocompletion : Make SpaceVim support + autocompletion. unite : Unite centric work-flow vim:tw=78:ts=8:ft=help:norl: