diff options
author | Shougo Matsushita <Shougo.Matsu@gmail.com> | 2020-02-20 08:08:35 +0900 |
---|---|---|
committer | Shougo Matsushita <Shougo.Matsu@gmail.com> | 2020-02-20 08:08:35 +0900 |
commit | 1ec8428fc4a150756dc793295b44f7e62544b5ed (patch) | |
tree | a02d8245005a7359135a6e96f42859b58cd42b06 /autoload/deoplete | |
parent | 1f76559c3bec877fe002d46176b960f7ea9659b6 (diff) | |
download | deoplete.nvim-1ec8428fc4a150756dc793295b44f7e62544b5ed.zip |
Improve msgpack version check
Diffstat (limited to 'autoload/deoplete')
-rw-r--r-- | autoload/deoplete/init.vim | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/autoload/deoplete/init.vim b/autoload/deoplete/init.vim index db4b24f..6b3b5de 100644 --- a/autoload/deoplete/init.vim +++ b/autoload/deoplete/init.vim @@ -54,6 +54,11 @@ function! deoplete#init#_channel() abort return 1 endif + if deoplete#init#_msgpack_version_check() + call deoplete#util#print_error('deoplete requires msgpack 1.0.0+.') + return 1 + endif + try if deoplete#util#has_yarp() let g:deoplete#_yarp = yarp#py3('deoplete') @@ -75,14 +80,10 @@ function! deoplete#init#_channel() abort \ 'deoplete requires Python3 support("+python3").') endif - if !deoplete#init#_python_version_check() + if deoplete#init#_python_version_check() 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() echomsg string(expand('<sfile>')) if !exists('*yarp#py3') @@ -281,6 +282,7 @@ function! deoplete#init#_msgpack_version_check() abort python3 << EOF import vim import msgpack +vim.vars['deoplete#_msgpack_version'] = msgpack.version vim.vars['deoplete#_msgpack_version_check'] = msgpack.version < (1, 0, 0) EOF return get(g:, 'deoplete#_msgpack_version_check', 0) |