mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-02-03 03:00:04 +08:00
Update coc.nvim installation (#3564)
* Fix coc.nvim installation. The installation scripts for coc.nvim have been removed. We also need to update the plugin install script to properly checkout the branch specified in the 'rev' attribute. This can be moved out of a separate git command into the initial clone. * Fix coc.vim installation * Change coc build command Co-authored-by: Theodore Ni <3806110+tjni@users.noreply.github.com> Co-authored-by: ChocoPowwwa <chocopowwwa@gmail.com>
This commit is contained in:
parent
337bc6f765
commit
f0d4ab2f6f
@ -26,8 +26,6 @@
|
||||
" directory is `~/.SpaceVim/snippets/`. If `g:spacevim_force_global_config = 1`,
|
||||
" SpaceVim will not append `./.SpaceVim/snippets` as default snippets directory.
|
||||
|
||||
let s:SYS = SpaceVim#api#import('system')
|
||||
|
||||
function! SpaceVim#layers#autocomplete#plugins() abort
|
||||
let plugins = [
|
||||
\ ['honza/vim-snippets', { 'on_event' : 'InsertEnter', 'loadconf_before' : 1}],
|
||||
@ -64,10 +62,10 @@ function! SpaceVim#layers#autocomplete#plugins() abort
|
||||
\ 'loadconf' : 1,
|
||||
\ }])
|
||||
elseif g:spacevim_autocomplete_method ==# 'coc'
|
||||
if s:SYS.isWindows
|
||||
call add(plugins, ['neoclide/coc.nvim', {'merged': 0, 'build': './install.cmd'}])
|
||||
if executable('yarn')
|
||||
call add(plugins, ['neoclide/coc.nvim', {'merged': 0, 'build': 'yarn install --frozen-lockfile'}])
|
||||
else
|
||||
call add(plugins, ['neoclide/coc.nvim', {'merged': 0, 'build': './install.sh'}])
|
||||
call add(plugins, ['neoclide/coc.nvim', {'merged': 0, 'rev': 'release'}])
|
||||
endif
|
||||
elseif g:spacevim_autocomplete_method ==# 'deoplete'
|
||||
call add(plugins, ['Shougo/deoplete.nvim', {
|
||||
|
@ -361,11 +361,6 @@ function! s:on_install_stdout(id, data, event) abort
|
||||
endfunction
|
||||
" @vimlint(EVL103, 0, a:event)
|
||||
|
||||
function! s:lock_revision(repo) abort
|
||||
let cmd = ['git', '--git-dir', a:repo.path . '/.git', 'checkout', a:repo.rev]
|
||||
call s:VIM_CO.system(cmd)
|
||||
endfunction
|
||||
|
||||
function! s:on_build_exit(id, data, event) abort
|
||||
if a:id == -1
|
||||
let id = s:jobpid
|
||||
@ -401,9 +396,6 @@ function! s:on_install_exit(id, data, event) abort
|
||||
call s:add_to_failed_list(s:pulling_repos[id].name)
|
||||
call s:msg_on_install_failed(s:pulling_repos[id].name)
|
||||
endif
|
||||
if get(s:pulling_repos[id], 'rev', '') !=# ''
|
||||
call s:lock_revision(s:pulling_repos[id])
|
||||
endif
|
||||
if !empty(get(s:pulling_repos[id], 'build', '')) && a:data == 0
|
||||
call s:build(s:pulling_repos[id])
|
||||
else
|
||||
@ -463,10 +455,9 @@ function! s:install(repo) abort
|
||||
let s:pct += 1
|
||||
let s:ui_buf[a:repo.name] = s:pct
|
||||
let url = s:get_uri(a:repo)
|
||||
if get(a:repo, 'rev', '') !=# ''
|
||||
let argv = ['git', 'clone', '--recursive', '--progress', url, a:repo.path]
|
||||
else
|
||||
let argv = ['git', 'clone', '--depth=1', '--recursive', '--progress', url, a:repo.path]
|
||||
if get(a:repo, 'rev', '') !=# ''
|
||||
let argv = argv + ['-b', a:repo.rev]
|
||||
endif
|
||||
if s:JOB.vim_job || s:JOB.nvim_job
|
||||
let jobid = s:JOB.start(argv,{
|
||||
|
Loading…
Reference in New Issue
Block a user