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.
This commit is contained in:
Michael Davis 2023-10-01 22:32:27 -05:00 committed by GitHub
parent 0e13db2832
commit 6abaf3d24f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -971,12 +971,12 @@ pub fn resolve_code_action(
) -> Option<impl Future<Output = Result<Value>>> {
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,
}