black icon indicating copy to clipboard operation
black copied to clipboard

Vim plugin: allow using system black rather than virtualenv

Open bugfood opened this issue 3 years ago • 1 comments

Provide a configuration parameter to the Vim plugin which will allow the plugin to skip setting up a virtualenv. This is useful when there is a system installation of black (e.g. from a Linux distribution) which the user prefers to use.

Using a virtualenv remains the default.

Description

I have several reasons why using a virtualenv is undesirable to me. I have listed them in the following feature request. Fixes: https://github.com/psf/black/issues/3308

Checklist - did you ...

  • [Y] Add an entry in CHANGES.md if necessary?
  • [N/A?] Add / update tests if necessary?
  • [Y] Add new / update outdated documentation?

Thanks, Corey

bugfood avatar Oct 04 '22 00:10 bugfood

@felix-hilden (or anyone) is there anything I need to do to get this PR merged? So far, I don't think there are any objections.

Thanks, Corey

bugfood avatar Oct 27 '22 17:10 bugfood

Thank you.

bugfood avatar Oct 28 '22 03:10 bugfood

To use this, add this to your .vimrc:

let g:black_use_virtualenv = 0

naught101 avatar Apr 19 '23 03:04 naught101