mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-01-23 13:10:04 +08:00
Add padawan
This commit is contained in:
parent
33c07fcad4
commit
ff2314256f
11
autoload/SpaceVim/layers/lang/php.vim
Normal file
11
autoload/SpaceVim/layers/lang/php.vim
Normal file
@ -0,0 +1,11 @@
|
||||
function! SpaceVim#layers#lang#php#plugins() abort
|
||||
let plugins = []
|
||||
if has('nvim')
|
||||
call add(plugins, ['padawan-php/deoplete-padawan'])
|
||||
endif
|
||||
return plugins
|
||||
endfunction
|
||||
|
||||
function! SpaceVim#layers#lang#php#config() abort
|
||||
|
||||
endfunction
|
@ -20,12 +20,12 @@ function! SpaceVim#mapping#tab() abort
|
||||
if getline('.')[col('.')-2] ==# '{'&& pumvisible()
|
||||
return "\<C-n>"
|
||||
endif
|
||||
if !index(g:spacevim_plugin_groups, 'autocompletion') == -1
|
||||
if index(g:spacevim_plugin_groups, 'autocomplete') != -1
|
||||
if neosnippet#expandable() && getline('.')[col('.')-2] ==# '(' && !pumvisible()
|
||||
return "\<Plug>(neosnippet_expand)"
|
||||
elseif neosnippet#jumpable()
|
||||
&& getline('.')[col('.')-2] ==# '(' && !pumvisible()
|
||||
&& !neosnippet#expandable()
|
||||
\ && getline('.')[col('.')-2] ==# '(' && !pumvisible()
|
||||
\ && !neosnippet#expandable()
|
||||
return "\<plug>(neosnippet_jump)"
|
||||
elseif neosnippet#expandable_or_jumpable() && getline('.')[col('.')-2] !=#'('
|
||||
return "\<plug>(neosnippet_expand_or_jump)"
|
||||
|
@ -13,7 +13,7 @@ augroup neosnippet_complete_done
|
||||
autocmd CompleteDone * call s:my_complete_done()
|
||||
augroup END
|
||||
function! s:my_complete_done() abort "{{{
|
||||
if get(v:,'completed_item','') ==# ''
|
||||
if !empty(get(v:,'completed_item',''))
|
||||
let snippet = neosnippet#parser#_get_completed_snippet(v:completed_item,neosnippet#util#get_cur_text(), neosnippet#util#get_next_text())
|
||||
if snippet ==# ''
|
||||
return
|
||||
|
Loading…
Reference in New Issue
Block a user