microsoft / microsoft/vscode-black-formatter
Add progress or busy indication when extension is formatting.
- Dominant language
- Python
- Stars
- 196
- Forks
- 49
- Avg merge
- 1d 5h
- Merged PRs (30d)
- 7
Description
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
Contributor guide
Research direction
Start by locating the formatting feature registered with @LSP_SERVER.feature and the handler that receives formatting parameters. Read the linked LSP document-formatting and client-initiated-progress specifications, then trace how the progress token is handled. Done means the client shows a busy or progress indication while formatting is running.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100