Notify users of missing Python lazily (#1210)
Currently this message shows up with no context prior to the start of Vim. By changing this to a lazy message, the user will only be notified of a problem with the Black plugin when they are attempting to use the Black plugin. Co-authored-by: Łukasz Langa <lukasz@langa.pl>
This commit is contained in:
parent
8fef74cf52
commit
bbe5ae70c1
@ -14,7 +14,12 @@
|
|||||||
" - restore cursor/window position after formatting
|
" - restore cursor/window position after formatting
|
||||||
|
|
||||||
if v:version < 700 || !has('python3')
|
if v:version < 700 || !has('python3')
|
||||||
echo "The black.vim plugin requires vim7.0+ with Python 3.6 support."
|
func! __BLACK_MISSING()
|
||||||
|
echo "The black.vim plugin requires vim7.0+ with Python 3.6 support."
|
||||||
|
endfunc
|
||||||
|
command! Black :call __BLACK_MISSING()
|
||||||
|
command! BlackUpgrade :call __BLACK_MISSING()
|
||||||
|
command! BlackVersion :call __BLACK_MISSING()
|
||||||
finish
|
finish
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user