mirror of
https://github.com/rust-lang/rust-analyzer
synced 2025-01-13 21:54:42 +00:00
Make sure there are no commands in code actions
This commit is contained in:
parent
0366a85052
commit
0f0c5081c0
8 changed files with 3 additions and 9 deletions
|
@ -118,7 +118,6 @@ fn map_rust_child_diagnostic(
|
||||||
changes: Some(edit_map),
|
changes: Some(edit_map),
|
||||||
document_changes: None,
|
document_changes: None,
|
||||||
}),
|
}),
|
||||||
command: None,
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -762,7 +762,6 @@ fn handle_fixes(
|
||||||
group: None,
|
group: None,
|
||||||
kind: Some(lsp_types::code_action_kind::QUICKFIX.into()),
|
kind: Some(lsp_types::code_action_kind::QUICKFIX.into()),
|
||||||
edit: Some(edit),
|
edit: Some(edit),
|
||||||
command: None,
|
|
||||||
};
|
};
|
||||||
res.push(action);
|
res.push(action);
|
||||||
}
|
}
|
||||||
|
|
|
@ -249,8 +249,9 @@ pub struct CodeAction {
|
||||||
pub group: Option<String>,
|
pub group: Option<String>,
|
||||||
#[serde(skip_serializing_if = "Option::is_none")]
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub kind: Option<String>,
|
pub kind: Option<String>,
|
||||||
#[serde(skip_serializing_if = "Option::is_none")]
|
// We don't handle commands on the client-side
|
||||||
pub command: Option<lsp_types::Command>,
|
// #[serde(skip_serializing_if = "Option::is_none")]
|
||||||
|
// pub command: Option<lsp_types::Command>,
|
||||||
#[serde(skip_serializing_if = "Option::is_none")]
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub edit: Option<SnippetWorkspaceEdit>,
|
pub edit: Option<SnippetWorkspaceEdit>,
|
||||||
}
|
}
|
||||||
|
|
|
@ -651,7 +651,6 @@ pub(crate) fn unresolved_code_action(
|
||||||
group: assist.group.filter(|_| snap.config.client_caps.code_action_group).map(|gr| gr.0),
|
group: assist.group.filter(|_| snap.config.client_caps.code_action_group).map(|gr| gr.0),
|
||||||
kind: Some(code_action_kind(assist.id.1)),
|
kind: Some(code_action_kind(assist.id.1)),
|
||||||
edit: None,
|
edit: None,
|
||||||
command: None,
|
|
||||||
};
|
};
|
||||||
Ok(res)
|
Ok(res)
|
||||||
}
|
}
|
||||||
|
|
|
@ -39,7 +39,6 @@
|
||||||
kind: Some(
|
kind: Some(
|
||||||
"quickfix",
|
"quickfix",
|
||||||
),
|
),
|
||||||
command: None,
|
|
||||||
edit: Some(
|
edit: Some(
|
||||||
SnippetWorkspaceEdit {
|
SnippetWorkspaceEdit {
|
||||||
changes: Some(
|
changes: Some(
|
||||||
|
|
|
@ -39,7 +39,6 @@
|
||||||
kind: Some(
|
kind: Some(
|
||||||
"quickfix",
|
"quickfix",
|
||||||
),
|
),
|
||||||
command: None,
|
|
||||||
edit: Some(
|
edit: Some(
|
||||||
SnippetWorkspaceEdit {
|
SnippetWorkspaceEdit {
|
||||||
changes: Some(
|
changes: Some(
|
||||||
|
|
|
@ -39,7 +39,6 @@
|
||||||
kind: Some(
|
kind: Some(
|
||||||
"quickfix",
|
"quickfix",
|
||||||
),
|
),
|
||||||
command: None,
|
|
||||||
edit: Some(
|
edit: Some(
|
||||||
SnippetWorkspaceEdit {
|
SnippetWorkspaceEdit {
|
||||||
changes: Some(
|
changes: Some(
|
||||||
|
|
|
@ -54,7 +54,6 @@
|
||||||
kind: Some(
|
kind: Some(
|
||||||
"quickfix",
|
"quickfix",
|
||||||
),
|
),
|
||||||
command: None,
|
|
||||||
edit: Some(
|
edit: Some(
|
||||||
SnippetWorkspaceEdit {
|
SnippetWorkspaceEdit {
|
||||||
changes: Some(
|
changes: Some(
|
||||||
|
|
Loading…
Reference in a new issue