on master help sign in
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.

commit6abaf3d24f47b9537766e9a8ffe1d76a4329d1f2 authorMichael Davis <mcarsondavis@gmail.com> dateSun 1 Oct 2023, 22:32 (3 years ago) parent0e13db2
1 file changed+4−4
helix-lsp/src/client.rs+4−4
helix-lsp/src/client.rs+4−4
@@ -971,12 +971,12 @@ impl Client {
971971 ) -> Option<impl Future<Output = Result<Value>>> {
972972 let capabilities = self.capabilities.get().unwrap();
973973
974− // Return early if the server does not support resolving code action.
975− match capabilities.completion_provider {
976− Some(lsp::CompletionOptions {
974+ // Return early if the server does not support resolving code actions.
975+ match capabilities.code_action_provider {
976+ Some(lsp::CodeActionProviderCapability::Options(lsp::CodeActionOptions {
977977 resolve_provider: Some(true),
978978 ..
979− }) => (),
979+ })) => (),
980980 _ => return None,
981981 }
982982