Add Black PyCharm 2023.2 integration instructions (#3839)
This commit is contained in:
parent
8daa64a2e1
commit
74d3009ba4
@ -10,16 +10,26 @@ Options include the following:
|
|||||||
|
|
||||||
## PyCharm/IntelliJ IDEA
|
## PyCharm/IntelliJ IDEA
|
||||||
|
|
||||||
There are three different ways you can use _Black_ from PyCharm:
|
There are several different ways you can use _Black_ from PyCharm:
|
||||||
|
|
||||||
1. As local server using the BlackConnect plugin
|
1. Using the built-in _Black_ integration (PyCharm 2023.2 and later). This option is the
|
||||||
1. As external tool
|
simplest to set up.
|
||||||
1. As file watcher
|
1. As local server using the BlackConnect plugin. This option formats the fastest. It
|
||||||
|
spins up {doc}`Black's HTTP server </usage_and_configuration/black_as_a_server>`, to
|
||||||
|
avoid the startup cost on subsequent formats.
|
||||||
|
1. As external tool.
|
||||||
|
1. As file watcher.
|
||||||
|
|
||||||
The first option is the simplest to set up and formats the fastest (by spinning up
|
### Built-in _Black_ integration
|
||||||
{doc}`Black's HTTP server </usage_and_configuration/black_as_a_server>`, avoiding the
|
|
||||||
startup cost on subsequent formats), but if you would prefer to not install a
|
1. Install `black`.
|
||||||
third-party plugin or blackd's extra dependencies, the other two are also great options.
|
|
||||||
|
```console
|
||||||
|
$ pip install black
|
||||||
|
```
|
||||||
|
|
||||||
|
1. Go to `Preferences or Settings -> Tools -> Black` and configure _Black_ to your
|
||||||
|
liking.
|
||||||
|
|
||||||
### As local server
|
### As local server
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user