diff --git a/pylsp_black/plugin.py b/pylsp_black/plugin.py index 5523896..5ce55fd 100644 --- a/pylsp_black/plugin.py +++ b/pylsp_black/plugin.py @@ -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