You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The language server seems to be checking the wrong capability (rangeFormatting) to determine whether to dynamically register its whole-document formatting capability with the client.
There's an easy workaround (set a rangeFormatting capability on the client) but it's not immediately apparent without reading through the code.
clientDynamicRegisterSupport is set here based on the client's rangeFormatting capability:
The language server should look at the client's formatting capability to determine whether to dynamically register its formatting capability
Current Behavior
The language server currently looks at the client's rangeFormatting capability to determine whether to dynamically register its formatting capability
Steps to Reproduce
Create a client that registers the formatting (not rangeFormatting) capability and observe that it never receives a client/registerCapability request from the server
Change the client to register the rangeFormatting capability and observe that the sever then sends a client/registerCapability request for formatting
Environment
Windows
Mac
Linux
other (please specify)
The text was updated successfully, but these errors were encountered:
Describe the bug
The language server seems to be checking the wrong capability (
rangeFormatting
) to determine whether to dynamically register its whole-documentformatting
capability with the client.There's an easy workaround (set a
rangeFormatting
capability on the client) but it's not immediately apparent without reading through the code.clientDynamicRegisterSupport
is set here based on the client'srangeFormatting
capability:yaml-language-server/src/yamlServerInit.ts
Lines 79 to 83 in 6eda5f6
But it's later used to dynamically register the whole-document
formatting
capability here:yaml-language-server/src/languageserver/handlers/settingsHandlers.ts
Lines 162 to 164 in 0080b8c
Thanks for all your work on this great project! 🙂
Expected Behavior
The language server should look at the client's
formatting
capability to determine whether to dynamically register itsformatting
capabilityCurrent Behavior
The language server currently looks at the client's
rangeFormatting
capability to determine whether to dynamically register itsformatting
capabilitySteps to Reproduce
formatting
(notrangeFormatting
) capability and observe that it never receives aclient/registerCapability
request from the serverrangeFormatting
capability and observe that the sever then sends aclient/registerCapability
request forformatting
Environment
The text was updated successfully, but these errors were encountered: