Skip to content

Commit

Permalink
Tell language servers that Helix can request formatting (helix-editor…
Browse files Browse the repository at this point in the history
…#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.
  • Loading branch information
robintown authored and kyruzic committed Sep 27, 2024
1 parent 10f8f2e commit 77ca8f2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions helix-lsp/src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -616,6 +616,9 @@ impl Client {
prepare_support_default_behavior: None,
honors_change_annotations: Some(false),
}),
formatting: Some(lsp::DocumentFormattingClientCapabilities {
dynamic_registration: Some(false),
}),
code_action: Some(lsp::CodeActionClientCapabilities {
code_action_literal_support: Some(lsp::CodeActionLiteralSupport {
code_action_kind: lsp::CodeActionKindLiteralSupport {
Expand Down

0 comments on commit 77ca8f2

Please sign in to comment.