mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-01-23 22:40:04 +08:00
Merge remote-tracking branch 'upstream/dev' into dev
This commit is contained in:
commit
e6740d9e47
12
autoload/SpaceVim/layers/lang/php.vim
Normal file
12
autoload/SpaceVim/layers/lang/php.vim
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
function! SpaceVim#layers#lang#php#plugins() abort
|
||||||
|
let plugins = []
|
||||||
|
if has('nvim')
|
||||||
|
call add(plugins, ['padawan-php/deoplete-padawan'])
|
||||||
|
endif
|
||||||
|
call add(plugins, ['php-vim/phpcd.vim'])
|
||||||
|
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()
|
if getline('.')[col('.')-2] ==# '{'&& pumvisible()
|
||||||
return "\<C-n>"
|
return "\<C-n>"
|
||||||
endif
|
endif
|
||||||
if !index(g:spacevim_plugin_groups, 'autocompletion') == -1
|
if index(g:spacevim_plugin_groups, 'autocomplete') != -1
|
||||||
if neosnippet#expandable() && getline('.')[col('.')-2] ==# '(' && !pumvisible()
|
if neosnippet#expandable() && getline('.')[col('.')-2] ==# '(' && !pumvisible()
|
||||||
return "\<Plug>(neosnippet_expand)"
|
return "\<Plug>(neosnippet_expand)"
|
||||||
elseif neosnippet#jumpable()
|
elseif neosnippet#jumpable()
|
||||||
&& getline('.')[col('.')-2] ==# '(' && !pumvisible()
|
\ && getline('.')[col('.')-2] ==# '(' && !pumvisible()
|
||||||
&& !neosnippet#expandable()
|
\ && !neosnippet#expandable()
|
||||||
return "\<plug>(neosnippet_jump)"
|
return "\<plug>(neosnippet_jump)"
|
||||||
elseif neosnippet#expandable_or_jumpable() && getline('.')[col('.')-2] !=#'('
|
elseif neosnippet#expandable_or_jumpable() && getline('.')[col('.')-2] !=#'('
|
||||||
return "\<plug>(neosnippet_expand_or_jump)"
|
return "\<plug>(neosnippet_expand_or_jump)"
|
||||||
|
@ -13,7 +13,8 @@ let g:deoplete#omni#input_patterns.java = [
|
|||||||
\]
|
\]
|
||||||
let g:deoplete#omni#input_patterns.jsp = ['[^. \t0-9]\.\w*']
|
let g:deoplete#omni#input_patterns.jsp = ['[^. \t0-9]\.\w*']
|
||||||
let g:deoplete#omni#input_patterns.php = '\h\w*\|[^. \t]->\%(\h\w*\)\?\|\h\w*::\%(\h\w*\)\?'
|
let g:deoplete#omni#input_patterns.php = '\h\w*\|[^. \t]->\%(\h\w*\)\?\|\h\w*::\%(\h\w*\)\?'
|
||||||
let g:deoplete#ignore_sources = {}
|
let g:deoplete#omni_patterns = get(g:, 'deoplete#omni_patterns', {})
|
||||||
|
let g:deoplete#omni_patterns.php = '->\|::'let g:deoplete#ignore_sources = {}
|
||||||
let g:deoplete#ignore_sources.go = ['omni']
|
let g:deoplete#ignore_sources.go = ['omni']
|
||||||
call deoplete#custom#set('go', 'mark', '')
|
call deoplete#custom#set('go', 'mark', '')
|
||||||
if g:spacevim_enable_javacomplete2_py
|
if g:spacevim_enable_javacomplete2_py
|
||||||
|
@ -13,7 +13,7 @@ augroup neosnippet_complete_done
|
|||||||
autocmd CompleteDone * call s:my_complete_done()
|
autocmd CompleteDone * call s:my_complete_done()
|
||||||
augroup END
|
augroup END
|
||||||
function! s:my_complete_done() abort "{{{
|
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())
|
let snippet = neosnippet#parser#_get_completed_snippet(v:completed_item,neosnippet#util#get_cur_text(), neosnippet#util#get_next_text())
|
||||||
if snippet ==# ''
|
if snippet ==# ''
|
||||||
return
|
return
|
||||||
|
Loading…
Reference in New Issue
Block a user