Switch to upstream protocol for resolving code action

Note that we have to maintain custom implementation on the client
side: I don't see how to marry bulitin resolve support with groups and
snippets.
This commit is contained in:
Aleksey Kladov
2020-11-10 18:20:01 +01:00
parent ada5a88f8f
commit 7d2eb000b0
15 changed files with 86 additions and 91 deletions

View File

@@ -36,7 +36,6 @@
fixes: [
CodeAction {
title: "consider prefixing with an underscore",
id: None,
group: None,
kind: Some(
CodeActionKind(
@@ -70,6 +69,7 @@
is_preferred: Some(
true,
),
data: None,
},
],
},

View File

@@ -36,7 +36,6 @@
fixes: [
CodeAction {
title: "consider prefixing with an underscore",
id: None,
group: None,
kind: Some(
CodeActionKind(
@@ -70,6 +69,7 @@
is_preferred: Some(
true,
),
data: None,
},
],
},

View File

@@ -36,7 +36,6 @@
fixes: [
CodeAction {
title: "consider prefixing with an underscore",
id: None,
group: None,
kind: Some(
CodeActionKind(
@@ -70,6 +69,7 @@
is_preferred: Some(
true,
),
data: None,
},
],
},

View File

@@ -51,7 +51,6 @@
fixes: [
CodeAction {
title: "return the expression directly",
id: None,
group: None,
kind: Some(
CodeActionKind(
@@ -98,6 +97,7 @@
is_preferred: Some(
true,
),
data: None,
},
],
},

View File

@@ -110,7 +110,6 @@ fn map_rust_child_diagnostic(
} else {
MappedRustChildDiagnostic::SuggestedFix(lsp_ext::CodeAction {
title: rd.message.clone(),
id: None,
group: None,
kind: Some(lsp_types::CodeActionKind::QUICKFIX),
edit: Some(lsp_ext::SnippetWorkspaceEdit {
@@ -119,6 +118,7 @@ fn map_rust_child_diagnostic(
document_changes: None,
}),
is_preferred: Some(true),
data: None,
})
}
}