Tell language servers that Helix can request formatting (#11064)

Without providing the formatting capability, the language server might not advertise its ability to format in return, causing the :format command to be broken.
This commit is contained in:
Robin 2024-07-01 20:42:51 -04:00 committed by GitHub
parent ed761fbe7c
commit 64f8660d3e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -616,6 +616,9 @@ impl Client {
prepare_support_default_behavior: None, prepare_support_default_behavior: None,
honors_change_annotations: Some(false), honors_change_annotations: Some(false),
}), }),
formatting: Some(lsp::DocumentFormattingClientCapabilities {
dynamic_registration: Some(false),
}),
code_action: Some(lsp::CodeActionClientCapabilities { code_action: Some(lsp::CodeActionClientCapabilities {
code_action_literal_support: Some(lsp::CodeActionLiteralSupport { code_action_literal_support: Some(lsp::CodeActionLiteralSupport {
code_action_kind: lsp::CodeActionKindLiteralSupport { code_action_kind: lsp::CodeActionKindLiteralSupport {