As the above clip shows the on-type formatting is a little clunky to use (and buggy in some scenarios) but it should be enough to serve as a demo on how to get started.
Also the relevant tests in tests/lsp have been migrated to end-to-end tests using the new example server.
Code review checklist (for code reviewer to complete)
[ ] Pull request represents a single change (i.e. not fixing disparate/unrelated things in a single PR)
[ ] Title summarizes what is changing
[ ] Commit messages are meaningful (see this for details)
[ ] Tests have been included and/or updated, as appropriate
[ ] Docstrings have been included and/or updated, as appropriate
Description (e.g. "Related to ...", etc.)
Following on from #440 this adds an example
formatting.py
server that implements the following requeststextDocument/formatting
textDocument/rangeFormatting
textDocument/onTypeFormatting
The server is intended to help with formatting simple markdown like tables
Screencast_20240425_182444.webm
As the above clip shows the on-type formatting is a little clunky to use (and buggy in some scenarios) but it should be enough to serve as a demo on how to get started. Also the relevant tests in
tests/lsp
have been migrated to end-to-end tests using the new example server.Code review checklist (for code reviewer to complete)