6523: Be more pedantic when checking codeAction/resolve support r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
This commit is contained in:
bors[bot] 2020-11-10 19:39:27 +00:00 committed by GitHub
commit 111cc34c8f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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;
}
}
_ => (),
}
}
}