From 6abaf3d24f47b9537766e9a8ffe1d76a4329d1f2 Mon Sep 17 00:00:00 2001 From: Michael Davis Date: Sun, 1 Oct 2023 22:32:27 -0500 Subject: [PATCH] LSP: Fix codeAction/resolve server capability check (#8421) Previously we accidentally checked the server's _completion_ resolve capability rather than the code action resolve capability. --- helix-lsp/src/client.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/helix-lsp/src/client.rs b/helix-lsp/src/client.rs index ed9a2f830..341702c37 100644 --- a/helix-lsp/src/client.rs +++ b/helix-lsp/src/client.rs @@ -971,12 +971,12 @@ impl Client { ) -> Option>> { let capabilities = self.capabilities.get().unwrap(); - // Return early if the server does not support resolving code action. - match capabilities.completion_provider { - Some(lsp::CompletionOptions { + // Return early if the server does not support resolving code actions. + match capabilities.code_action_provider { + Some(lsp::CodeActionProviderCapability::Options(lsp::CodeActionOptions { resolve_provider: Some(true), .. - }) => (), + })) => (), _ => return None, }