From 0caa4918932cd70b8eef58279a1a5e783ac19fb1 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Tue, 10 Nov 2020 20:38:10 +0100 Subject: Be more pedantic when checking codeAction/resolve support --- crates/rust-analyzer/src/config.rs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'crates') diff --git a/crates/rust-analyzer/src/config.rs b/crates/rust-analyzer/src/config.rs index 9cc14fe82..b4c738272 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; + } } + _ => (), } } } -- cgit v1.2.3