Use better default venv dir when using neovim (#937)

This commit is contained in:
Asger Hautop Drewsen 2019-10-20 16:43:02 +02:00 committed by Łukasz Langa
parent 51f1e0a873
commit 4bcae4cf83
2 changed files with 6 additions and 2 deletions

View File

@ -725,7 +725,7 @@ Configuration:
* `g:black_fast` (defaults to `0`)
* `g:black_linelength` (defaults to `88`)
* `g:black_skip_string_normalization` (defaults to `0`)
* `g:black_virtualenv` (defaults to `~/.vim/black`)
* `g:black_virtualenv` (defaults to `~/.vim/black` or `~/.local/share/nvim/black`)
To install with [vim-plug](https://github.com/junegunn/vim-plug):

View File

@ -24,7 +24,11 @@ endif
let g:load_black = "py1.0"
if !exists("g:black_virtualenv")
let g:black_virtualenv = "~/.vim/black"
if has("nvim")
let g:black_virtualenv = "~/.local/share/nvim/black"
else
let g:black_virtualenv = "~/.vim/black"
endif
endif
if !exists("g:black_fast")
let g:black_fast = 0