Skip to content

Commit 2867a45

Browse files
committed
notfy: give ack. when isort formatter runs
1 parent 590cecc commit 2867a45

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

pylsp_isort/plugin.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
from isort.settings import KNOWN_PREFIX
88
from pylsp import hookimpl
99
from pylsp.config.config import Config
10-
from pylsp.workspace import Document
10+
from pylsp.workspace import Document, Workspace
1111

1212
logger = logging.getLogger(__name__)
1313

@@ -34,8 +34,12 @@ def pylsp_settings() -> Dict[str, Any]:
3434

3535

3636
@hookimpl(hookwrapper=True)
37-
def pylsp_format_document(config: Config, document: Document) -> Generator:
37+
def pylsp_format_document(
38+
config: Config, workspace: Workspace, document: Document
39+
) -> Generator:
3840
outcome = yield
41+
with workspace.report_progress("format: isort"):
42+
_format(outcome, config, document)
3943
_format(outcome, config, document)
4044

4145

0 commit comments

Comments
 (0)