Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions pylsp_black/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,18 @@


@hookimpl(tryfirst=True)
def pylsp_format_document(config, document):
return format_document(config, document)
def pylsp_format_document(config, workspace, document):
with workspace.report_progress("format: black"):
return format_document(config, document)


@hookimpl(tryfirst=True)
def pylsp_format_range(config, document, range):
def pylsp_format_range(config, workspace, document, range):
range["start"]["character"] = 0
range["end"]["line"] += 1
range["end"]["character"] = 0
return format_document(config, document, range)
with workspace.report_progress("format: black"):
return format_document(config, document, range)


@hookimpl
Expand Down