CodeAction groups

This commit is contained in:
Aleksey Kladov
2020-05-22 17:29:55 +02:00
parent 5ef4ebff20
commit 2075e77ee5
11 changed files with 109 additions and 83 deletions

View File

@@ -65,6 +65,7 @@ expression: diag
fixes: [
CodeAction {
title: "return the expression directly",
group: None,
kind: Some(
"quickfix",
),

View File

@@ -50,6 +50,7 @@ expression: diag
fixes: [
CodeAction {
title: "consider prefixing with an underscore",
group: None,
kind: Some(
"quickfix",
),

View File

@@ -145,6 +145,7 @@ fn map_rust_child_diagnostic(
} else {
MappedRustChildDiagnostic::SuggestedFix(lsp_ext::CodeAction {
title: rd.message.clone(),
group: None,
kind: Some("quickfix".to_string()),
edit: Some(lsp_ext::SnippetWorkspaceEdit {
// FIXME: there's no good reason to use edit_map here....