You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+27-4Lines changed: 27 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -21,8 +21,31 @@ To avoid unexpected results you should make sure `yapf` and `autopep8` are not i
21
21
- The code will only be formatted if it is syntactically valid Python.
22
22
- Text selections are treated as if they were a separate Python file.
23
23
Unfortunately this means you can't format an indented block of code.
24
-
-`python-lsp-black` will use your project's [pyproject.toml](https://github.com/psf/black#pyprojecttoml) if it has one.
25
-
-`python-lsp-black` only officially supports the latest stable version of [black](https://github.com/psf/black). An effort is made to keep backwards-compatibility but older black versions will not be actively tested.
24
+
-`python-lsp-black` will use your project's
25
+
[pyproject.toml](https://github.com/psf/black#pyprojecttoml) if it has one.
26
+
-`python-lsp-black` only officially supports the latest stable version of
27
+
[black](https://github.com/psf/black). An effort is made to keep backwards-compatibility
28
+
but older black versions will not be actively tested.
29
+
- The plugin can cache the black configuration that applies to each Python file, this
30
+
improves performance of the plugin. When configuration caching is enabled any changes to
31
+
black's configuration will need the LSP server to be restarted. Configuration caching
32
+
can be disabled with the `cache_config` option, see *Configuration* below.
33
+
34
+
# Configuration
35
+
36
+
The plugin follows [python-lsp-server's
37
+
configuration](https://github.com/python-lsp/python-lsp-server/#configuration=). These are
38
+
the valid configuration keys:
39
+
40
+
-`pylsp.plugins.black.enabled`: boolean to enable/disable the plugin.
41
+
-`pylsp.plugins.black.cache_config`: a boolean to enable black configuration caching (see
42
+
*Usage*). `false` by default.
43
+
-`pylsp.plugins.black.line_length`: an integer that maps to [black's
0 commit comments