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.
pull/8441/head
Michael Davis 1 year ago committed by GitHub
parent 0e13db2832
commit 6abaf3d24f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -971,12 +971,12 @@ impl Client {
) -> Option<impl Future<Output = Result<Value>>> { ) -> Option<impl Future<Output = Result<Value>>> {
let capabilities = self.capabilities.get().unwrap(); let capabilities = self.capabilities.get().unwrap();
// Return early if the server does not support resolving code action. // Return early if the server does not support resolving code actions.
match capabilities.completion_provider { match capabilities.code_action_provider {
Some(lsp::CompletionOptions { Some(lsp::CodeActionProviderCapability::Options(lsp::CodeActionOptions {
resolve_provider: Some(true), resolve_provider: Some(true),
.. ..
}) => (), })) => (),
_ => return None, _ => return None,
} }

Loading…
Cancel
Save