1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-01-23 10:20:05 +08:00

zsh:support autocomplete

1. autotrigger in YCM and deoplete.
2. press ^x^o in other case
This commit is contained in:
tracyone 2017-12-03 20:47:47 +08:00
parent 91cad9eabc
commit 8880cf355b
2 changed files with 11 additions and 5 deletions

View File

@ -1,7 +1,12 @@
function! SpaceVim#layers#lang#javascript#plugins() abort
return [
\ ['chrisbra/vim-zsh', { 'on_ft' : 'zsh' }]
\ ]
function! SpaceVim#layers#lang#sh#plugins() abort
let l:plugins = []
call add(l:plugins, ['chrisbra/vim-zsh', { 'on_ft' : 'zsh' }])
if get(g:, 'spacevim_enable_ycm') == 1
call add(l:plugins, ['Valodim/vim-zsh-completion', { 'on_ft' : 'zsh' }])
else
call add(l:plugins, ['zchee/deoplete-zsh', { 'on_ft' : 'zsh' }])
endif
return l:plugins
endfunction
function! SpaceVim#layers#lang#sh#config()

View File

@ -19,5 +19,6 @@ let g:ycm_semantic_triggers = {
\ 'ruby' : ['.', '::'],
\ 'lua' : ['.', ':'],
\ 'erlang' : [':'],
\ 'sh' : ['re!\w{2}', '/', '-'],
\ 'sh' : ['re![\w-]{2}', '/', '-'],
\ 'zsh' : ['re![\w-]{2}', '/', '-'],
\ }