mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-02-03 00:50:05 +08:00
fix(core): check requirements when change autocomplete_method
This commit is contained in:
parent
efa65d6537
commit
f7ccafb114
@ -63,9 +63,9 @@ endfunction
|
|||||||
function! s:global_dir() abort
|
function! s:global_dir() abort
|
||||||
if empty($SPACEVIMDIR)
|
if empty($SPACEVIMDIR)
|
||||||
if !empty($XDG_CONFIG_HOME)
|
if !empty($XDG_CONFIG_HOME)
|
||||||
return s:FILE.unify_path($XDG_CONFIG_HOME.'/SpaceVim.d/')
|
return s:FILE.unify_path($XDG_CONFIG_HOME.'/SpaceVim.d/')
|
||||||
else
|
else
|
||||||
return s:FILE.unify_path($HOME.'/.SpaceVim.d/')
|
return s:FILE.unify_path($HOME.'/.SpaceVim.d/')
|
||||||
endif
|
endif
|
||||||
else
|
else
|
||||||
return s:FILE.unify_path($SPACEVIMDIR)
|
return s:FILE.unify_path($SPACEVIMDIR)
|
||||||
@ -161,6 +161,17 @@ function! s:apply(config, type) abort
|
|||||||
continue
|
continue
|
||||||
endif
|
endif
|
||||||
" keep backward compatibility
|
" keep backward compatibility
|
||||||
|
elseif name ==# 'autocomplete_method'
|
||||||
|
if value ==# 'deoplete' && !has('python3')
|
||||||
|
if (has('python3')
|
||||||
|
\ && (SpaceVim#util#haspy3lib('neovim')
|
||||||
|
\ || SpaceVim#util#haspy3lib('pynvim'))) &&
|
||||||
|
\ (has('nvim') || (has('patch-8.0.0027')))
|
||||||
|
else
|
||||||
|
call SpaceVim#logger#warn('deoplete requires +python3!')
|
||||||
|
continue
|
||||||
|
endif
|
||||||
|
endif
|
||||||
elseif name ==# 'statusline_right_sections'
|
elseif name ==# 'statusline_right_sections'
|
||||||
let name = 'statusline_right'
|
let name = 'statusline_right'
|
||||||
elseif name ==# 'statusline_right_sections'
|
elseif name ==# 'statusline_right_sections'
|
||||||
|
Loading…
Reference in New Issue
Block a user