Skip to content

Commit 0caa491

Browse files
committed
Be more pedantic when checking codeAction/resolve support
1 parent 7d2eb00 commit 0caa491

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

crates/rust-analyzer/src/config.rs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -385,10 +385,13 @@ impl Config {
385385
}
386386

387387
if let Some(code_action) = &doc_caps.code_action {
388-
if let Some(resolve_support) = &code_action.resolve_support {
389-
if resolve_support.properties.iter().any(|it| it == "edit") {
390-
self.client_caps.code_action_resolve = true;
388+
match (code_action.data_support, &code_action.resolve_support) {
389+
(Some(true), Some(resolve_support)) => {
390+
if resolve_support.properties.iter().any(|it| it == "edit") {
391+
self.client_caps.code_action_resolve = true;
392+
}
391393
}
394+
_ => (),
392395
}
393396
}
394397
}

0 commit comments

Comments
 (0)