From 64f8660d3e4c0f4e8d8d3423257822d25e023b99 Mon Sep 17 00:00:00 2001 From: Robin Date: Mon, 1 Jul 2024 20:42:51 -0400 Subject: [PATCH] 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. --- helix-lsp/src/client.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/helix-lsp/src/client.rs b/helix-lsp/src/client.rs index 254625a3a..0a822c5b3 100644 --- a/helix-lsp/src/client.rs +++ b/helix-lsp/src/client.rs @@ -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 {