Skip to content

fix: add missing dynamic capability exceptions - #3084

Merged
rwols merged 4 commits into
mainfrom
fix/missing-dynamic-capability-exceptions
Oct 18, 2026
Merged

rwols merged 4 commits into
mainfrom
fix/missing-dynamic-capability-exceptions

Conversation

@rwols

@rwols rwols commented Oct 18, 2026 •

Copy link
Copy Markdown
Member

I've noticed LSP-ruff used to be able to do "Format Selection". But with the latest server version it did not work any more. That's because it now registers the capability via client/registerCapability. So it's a dynamic capability now as opposed to a static capability listed in the initialize response.

The textDocument/rangeFormatting request did not map to the right capability name. That's why "Format Selection" did not show up any more.

Fix by adding the exception to the _METHOD_TO_CAPABILITY_EXCEPTIONS dict.

Also, add the rest of the missing exceptions.

I've noticed LSP-ruff used to be able to do "Format Selection". But with the
latest server version it did not work any more. That's because it now registers
the capability via `client/registerCapability`. So it's a dynamic capability
now as opposed to a static capability listed in the `initialize` response.

The `textDocument/documentRangeFormatting` request did not map to the right
capability name. That's why "Format Selection" did not show up any more.

Fix by adding the exception to the `_METHOD_TO_CAPABILITY_EXCEPTIONS` dict.

Also, add the rest of the missing exceptions.
Comment thread plugin/core/types.py Resolved
Comment thread plugin/core/types.py Resolved
rwols and others added 3 commits October 18, 2026 12:34
Co-authored-by: Rafał Chłodnicki <rchl2k@gmail.com>
Co-authored-by: Rafał Chłodnicki <rchl2k@gmail.com>
@rwols
rwols requested a review from rchl October 18, 2026 10:37
@rwols
rwols merged commit d17ef83 into main Oct 18, 2026
9 checks passed
@rwols
rwols deleted the fix/missing-dynamic-capability-exceptions branch October 18, 2026 10:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants