diff options
author | Shougo Matsushita <Shougo.Matsu@gmail.com> | 2020-02-19 08:07:05 +0900 |
---|---|---|
committer | Shougo Matsushita <Shougo.Matsu@gmail.com> | 2020-02-19 08:07:05 +0900 |
commit | 4ab337831547081459188b9ebc4a2a057b93faf5 (patch) | |
tree | 88a968b934982b451142f4f99ac2903a4fecc5f1 /autoload/deoplete | |
parent | e897e0142759eb7ffbded565389243cab6a09a91 (diff) | |
download | deoplete.nvim-4ab337831547081459188b9ebc4a2a057b93faf5.zip |
Add msgpack check
Diffstat (limited to 'autoload/deoplete')
-rw-r--r-- | autoload/deoplete/init.vim | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/autoload/deoplete/init.vim b/autoload/deoplete/init.vim index 0164cf7..1f9842c 100644 --- a/autoload/deoplete/init.vim +++ b/autoload/deoplete/init.vim @@ -76,7 +76,11 @@ function! deoplete#init#_channel() abort endif if !deoplete#init#_python_version_check() - call deoplete#util#print_error('deoplete requires Python3.6.1+.') + call deoplete#util#print_error('deoplete requires Python 3.6.1+.') + endif + + if !deoplete#init#_msgpack_version_check() + call deoplete#util#print_error('deoplete requires msgpack 1.0.0+.') endif if deoplete#util#has_yarp() @@ -271,3 +275,12 @@ vim.vars['deoplete#_python_version_check'] = ( EOF return get(g:, 'deoplete#_python_version_check', 0) endfunction + +function! deoplete#init#_msgpack_version_check() abort + python3 << EOF +import vim +import msgpack +vim.vars['deoplete#_msgpack_version_check'] = msgpack.version < (1, 0, 0) +EOF + return get(g:, 'deoplete#_msgpack_version_check', 0) +endfunction |