about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--crates/rust-analyzer/src/config.rs9
1 files changed, 6 insertions, 3 deletions
diff --git a/crates/rust-analyzer/src/config.rs b/crates/rust-analyzer/src/config.rs
index 9cc14fe827b..b4c738272b6 100644
--- a/crates/rust-analyzer/src/config.rs
+++ b/crates/rust-analyzer/src/config.rs
@@ -385,10 +385,13 @@ impl Config {
             }
 
             if let Some(code_action) = &doc_caps.code_action {
-                if let Some(resolve_support) = &code_action.resolve_support {
-                    if resolve_support.properties.iter().any(|it| it == "edit") {
-                        self.client_caps.code_action_resolve = true;
+                match (code_action.data_support, &code_action.resolve_support) {
+                    (Some(true), Some(resolve_support)) => {
+                        if resolve_support.properties.iter().any(|it| it == "edit") {
+                            self.client_caps.code_action_resolve = true;
+                        }
                     }
+                    _ => (),
                 }
             }
         }