Skip to content

Commit 5a3ec80

Browse files
committed
Add hook with default configuration options
1 parent 0c56c67 commit 5a3ec80

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

pylsp_black/plugin.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,22 @@ def pylsp_format_range(config, document, range):
4141
return format_document(config, document, range)
4242

4343

44+
@hookimpl
45+
def pylsp_settings():
46+
"""Configuration options that can be set on the client."""
47+
return {
48+
"plugins": {
49+
"black": {
50+
# Disable this plugin by default because it's third-party.
51+
"enabled": False,
52+
"line_length": 88,
53+
"preview": False,
54+
"cache_config": False,
55+
}
56+
}
57+
}
58+
59+
4460
def format_document(client_config, document, range=None):
4561
if range:
4662
start = range["start"]["line"]

0 commit comments

Comments
 (0)