X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/52384bf0a3fe4b0d0a11daad6ef90b8cd948a773..64c8be01f0cfedc94cb1c9ebd342ea77cafbb78a:/plugin/black.vim diff --git a/plugin/black.vim b/plugin/black.vim index 3bdca62..90d2047 100644 --- a/plugin/black.vim +++ b/plugin/black.vim @@ -53,8 +53,20 @@ endif if !exists("g:black_quiet") let g:black_quiet = 0 endif +if !exists("g:black_target_version") + let g:black_target_version = "" +endif +function BlackComplete(ArgLead, CmdLine, CursorPos) + return [ +\ 'target_version=py27', +\ 'target_version=py36', +\ 'target_version=py37', +\ 'target_version=py38', +\ 'target_version=py39', +\ ] +endfunction -command! Black :call black#Black() +command! -nargs=* -complete=customlist,BlackComplete Black :call black#Black() command! BlackUpgrade :call black#BlackUpgrade() command! BlackVersion :call black#BlackVersion()