1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-04-14 15:19:12 +08:00

Add buffer and neco

This commit is contained in:
wsdjeg 2017-11-23 23:57:13 +08:00
parent 851acc3c46
commit c67f6a8c9f
4 changed files with 25 additions and 4 deletions

View File

@ -67,6 +67,10 @@ function! SpaceVim#layers#autocomplete#plugins() abort
\ 'loadconf' : 1,
\ 'merged' : 0,
\ }])
call add(plugins, ['prabirshrestha/asyncomplete-buffer.vim', {
\ 'loadconf' : 1,
\ 'merged' : 0,
\ }])
elseif g:spacevim_autocomplete_method == 'completor'
call add(plugins, ['maralla/completor.vim', {
\ 'loadconf' : 1,

View File

@ -7,6 +7,12 @@ function! SpaceVim#layers#lang#vim#plugins() abort
call add(plugins,['tweekmonster/exception.vim'])
call add(plugins,['mhinz/vim-lookup'])
call add(plugins,['Shougo/neco-vim', { 'on_event' : 'InsertEnter', 'loadconf_before' : 1}])
if g:spacevim_autocomplete_method == 'asyncomplete'
call add(plugins, ['prabirshrestha/asyncomplete-necovim.vim', {
\ 'loadconf' : 1,
\ 'merged' : 0,
\ }])
endif
call add(plugins,['tweekmonster/helpful.vim', {'on_cmd': 'HelpfulVersion'}])
return plugins
endfunction
@ -18,11 +24,11 @@ endfunction
function! s:language_specified_mappings() abort
call SpaceVim#mapping#space#langSPC('nmap', ['l','e'], 'call call('
\ . string(function('s:eval_cursor')) . ', [])',
\ 'echo eval under cursor', 1)
\ . string(function('s:eval_cursor')) . ', [])',
\ 'echo eval under cursor', 1)
call SpaceVim#mapping#space#langSPC('nmap', ['l','v'], 'call call('
\ . string(function('s:helpversion_cursor')) . ', [])',
\ 'echo helpversion under cursor', 1)
\ . string(function('s:helpversion_cursor')) . ', [])',
\ 'echo helpversion under cursor', 1)
endfunction
function! s:eval_cursor() abort

View File

@ -0,0 +1,6 @@
au User asyncomplete_setup call asyncomplete#register_source(asyncomplete#sources#buffer#get_source_options({
\ 'name': 'B',
\ 'whitelist': ['*'],
\ 'blacklist': ['go'],
\ 'completor': function('asyncomplete#sources#buffer#completor'),
\ }))

View File

@ -0,0 +1,5 @@
au User asyncomplete_setup call asyncomplete#register_source(asyncomplete#sources#necovim#get_source_options({
\ 'name': 'necovim',
\ 'whitelist': ['vim'],
\ 'completor': function('asyncomplete#sources#necovim#completor'),
\ }))