microsoft / vscode-black-formatter

Formatting support for Python using the Black formatter
https://marketplace.visualstudio.com/items?itemName=ms-python.black-formatter
MIT License
152 stars 36 forks source link

Add progress or busy indication when extension is formatting. #56

Open karthiknadig opened 2 years ago

karthiknadig commented 2 years ago

Based on input from @Bobronium

This is definitely possible with the Progress APIs for LSP. We just need to set workDoneProgress: True as the option when we register the Formatting feature @LSP_SERVER.feature https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#documentFormattingOptions

Then in the params handle the progress token and respond accordingly to those params. https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#clientInitiatedProgress

agnes-sharan commented 1 year ago

Hi is this issue still open for contribution?

karthiknadig commented 1 year ago

@agnes-sharan Go ahead.