mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-03-22 17:05:42 +08:00
parent
974b635c7c
commit
2845282410
@ -66,8 +66,10 @@ function! s:self.start(argv, ...) abort
|
|||||||
else
|
else
|
||||||
let job = jobstart(a:argv)
|
let job = jobstart(a:argv)
|
||||||
endi
|
endi
|
||||||
|
if job > 0
|
||||||
let msg = ['process '. jobpid(job), ' run']
|
let msg = ['process '. jobpid(job), ' run']
|
||||||
call extend(self.jobs, {job : msg})
|
call extend(self.jobs, {job : msg})
|
||||||
|
endif
|
||||||
return job
|
return job
|
||||||
elseif self.vim_job
|
elseif self.vim_job
|
||||||
if len(a:000) > 0
|
if len(a:000) > 0
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
function! SpaceVim#layers#core#plugins() abort
|
function! SpaceVim#layers#core#plugins() abort
|
||||||
return [
|
return [
|
||||||
\ ['Shougo/vimproc.vim', {'build' : 'make'}],
|
\ ['Shougo/vimproc.vim', {'build' : ['make']}],
|
||||||
\ ['benizi/vim-automkdir'],
|
\ ['benizi/vim-automkdir'],
|
||||||
\ ['airblade/vim-rooter', {'on_cmd' : 'Rooter'}],
|
\ ['airblade/vim-rooter', {'on_cmd' : 'Rooter'}],
|
||||||
\ ]
|
\ ]
|
||||||
|
@ -17,11 +17,11 @@
|
|||||||
|
|
||||||
function! SpaceVim#layers#lang#php#plugins() abort
|
function! SpaceVim#layers#lang#php#plugins() abort
|
||||||
let plugins = []
|
let plugins = []
|
||||||
call add(plugins, ['php-vim/phpcd.vim', { 'on_ft' : 'php', 'build' : 'composer install'}])
|
call add(plugins, ['php-vim/phpcd.vim', { 'on_ft' : 'php', 'build' : ['composer', 'install']}])
|
||||||
call add(plugins, ['StanAngeloff/php.vim', { 'on_ft' : 'php'}])
|
call add(plugins, ['StanAngeloff/php.vim', { 'on_ft' : 'php'}])
|
||||||
call add(plugins, ['2072/PHP-Indenting-for-VIm', { 'on_ft' : 'php'}])
|
call add(plugins, ['2072/PHP-Indenting-for-VIm', { 'on_ft' : 'php'}])
|
||||||
call add(plugins, ['rafi/vim-phpspec', { 'on_ft' : 'php'}])
|
call add(plugins, ['rafi/vim-phpspec', { 'on_ft' : 'php'}])
|
||||||
call add(plugins, ['lvht/phpfold.vim', { 'on_ft' : 'php', 'build' : 'composer install'}])
|
call add(plugins, ['lvht/phpfold.vim', { 'on_ft' : 'php', 'build' : ['composer', 'install']}])
|
||||||
return plugins
|
return plugins
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
@ -245,7 +245,7 @@ function! s:on_pull_exit(id, data, event) abort
|
|||||||
if a:id == -1
|
if a:id == -1
|
||||||
redraw!
|
redraw!
|
||||||
endif
|
endif
|
||||||
if get(s:pulling_repos[id], 'build', '') !=# ''
|
if !empty(get(s:pulling_repos[id], 'build', ''))
|
||||||
call s:build(s:pulling_repos[id])
|
call s:build(s:pulling_repos[id])
|
||||||
else
|
else
|
||||||
let s:pct_done += 1
|
let s:pct_done += 1
|
||||||
@ -412,9 +412,17 @@ function! s:build(repo) abort
|
|||||||
\ 'on_exit' : function('s:on_build_exit'),
|
\ 'on_exit' : function('s:on_build_exit'),
|
||||||
\ 'cwd' : a:repo.path,
|
\ 'cwd' : a:repo.path,
|
||||||
\ })
|
\ })
|
||||||
if jobid != 0
|
let s:building_repos[jobid . ''] = a:repo
|
||||||
let s:building_repos[jobid] = a:repo
|
if jobid > 0
|
||||||
call s:msg_on_build_start(a:repo.name)
|
call s:msg_on_build_start(a:repo.name)
|
||||||
|
elseif jobid == 0
|
||||||
|
call s:msg_on_build_failed(a:repo.name)
|
||||||
|
elseif jobid == -1
|
||||||
|
if type(argv) == type([])
|
||||||
|
call s:msg_on_build_failed(a:repo.name, argv[0] . ' is not executable')
|
||||||
|
else
|
||||||
|
call s:msg_on_build_failed(a:repo.name)
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
else
|
else
|
||||||
let s:building_repos[s:jobpid] = a:repo
|
let s:building_repos[s:jobpid] = a:repo
|
||||||
@ -492,8 +500,12 @@ function! s:msg_on_build_done(name) abort
|
|||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
" - foo.vim: Updating failed.
|
" - foo.vim: Updating failed.
|
||||||
function! s:msg_on_build_failed(name) abort
|
function! s:msg_on_build_failed(name, ...) abort
|
||||||
|
if a:0 == 1
|
||||||
|
call s:set_buf_line(s:plugin_manager_buffer, s:ui_buf[a:name] + 3, 'x ' . a:name . ': Building failed, ' . a:1)
|
||||||
|
else
|
||||||
call s:set_buf_line(s:plugin_manager_buffer, s:ui_buf[a:name] + 3, 'x ' . a:name . ': Building failed.')
|
call s:set_buf_line(s:plugin_manager_buffer, s:ui_buf[a:name] + 3, 'x ' . a:name . ': Building failed.')
|
||||||
|
endif
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! s:new_window() abort
|
function! s:new_window() abort
|
||||||
|
Loading…
x
Reference in New Issue
Block a user